{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/hamzafarooq/building-llm-applications-from-scratch/blob/main/Module%204/Module_4_Foundation_semantic_search_module.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "YwPCKiUmifPg",
        "outputId": "bc7dc6c9-3c75-4e24-85f2-5c8d8e2263e9"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Collecting en-core-web-sm==3.7.1\n",
            "  Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.7.1/en_core_web_sm-3.7.1-py3-none-any.whl (12.8 MB)\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.8/12.8 MB\u001b[0m \u001b[31m61.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hRequirement already satisfied: spacy<3.8.0,>=3.7.2 in /usr/local/lib/python3.10/dist-packages (from en-core-web-sm==3.7.1) (3.7.5)\n",
            "Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.0.12)\n",
            "Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.0.5)\n",
            "Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.0.10)\n",
            "Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.0.8)\n",
            "Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.0.9)\n",
            "Requirement already satisfied: thinc<8.3.0,>=8.2.2 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (8.2.5)\n",
            "Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.1.3)\n",
            "Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.4.8)\n",
            "Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.0.10)\n",
            "Requirement already satisfied: weasel<0.5.0,>=0.1.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (0.4.1)\n",
            "Requirement already satisfied: typer<1.0.0,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (0.12.5)\n",
            "Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (4.66.5)\n",
            "Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.32.3)\n",
            "Requirement already satisfied: pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.9.2)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.1.4)\n",
            "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (75.1.0)\n",
            "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (24.1)\n",
            "Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.4.1)\n",
            "Requirement already satisfied: numpy>=1.19.0 in /usr/local/lib/python3.10/dist-packages (from spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.26.4)\n",
            "Requirement already satisfied: language-data>=1.2 in /usr/local/lib/python3.10/dist-packages (from langcodes<4.0.0,>=3.2.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.2.0)\n",
            "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (0.7.0)\n",
            "Requirement already satisfied: pydantic-core==2.23.4 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.23.4)\n",
            "Requirement already satisfied: typing-extensions>=4.6.1 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,<3.0.0,>=1.7.4->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (4.12.2)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.4.0)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.2.3)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2024.8.30)\n",
            "Requirement already satisfied: blis<0.8.0,>=0.7.8 in /usr/local/lib/python3.10/dist-packages (from thinc<8.3.0,>=8.2.2->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (0.7.11)\n",
            "Requirement already satisfied: confection<1.0.0,>=0.0.1 in /usr/local/lib/python3.10/dist-packages (from thinc<8.3.0,>=8.2.2->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (0.1.5)\n",
            "Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0.0,>=0.3.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (8.1.7)\n",
            "Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0.0,>=0.3.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.5.4)\n",
            "Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0.0,>=0.3.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (13.9.2)\n",
            "Requirement already satisfied: cloudpathlib<1.0.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from weasel<0.5.0,>=0.1.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (0.19.0)\n",
            "Requirement already satisfied: smart-open<8.0.0,>=5.2.1 in /usr/local/lib/python3.10/dist-packages (from weasel<0.5.0,>=0.1.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (7.0.5)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.0.1)\n",
            "Requirement already satisfied: marisa-trie>=0.7.7 in /usr/local/lib/python3.10/dist-packages (from language-data>=1.2->langcodes<4.0.0,>=3.2.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.2.1)\n",
            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0.0,>=0.3.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (3.0.0)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0.0,>=0.3.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (2.18.0)\n",
            "Requirement already satisfied: wrapt in /usr/local/lib/python3.10/dist-packages (from smart-open<8.0.0,>=5.2.1->weasel<0.5.0,>=0.1.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (1.16.0)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0.0,>=0.3.0->spacy<3.8.0,>=3.7.2->en-core-web-sm==3.7.1) (0.1.2)\n",
            "\u001b[38;5;2m✔ Download and installation successful\u001b[0m\n",
            "You can now load the package via spacy.load('en_core_web_sm')\n",
            "\u001b[38;5;3m⚠ Restart to reload dependencies\u001b[0m\n",
            "If you are in a Jupyter or Colab notebook, you may need to restart Python in\n",
            "order to load all the package's dependencies. You can do this by selecting the\n",
            "'Restart kernel' or 'Restart runtime' option.\n",
            "Collecting openai==0.27.7\n",
            "  Downloading openai-0.27.7-py3-none-any.whl.metadata (13 kB)\n",
            "Requirement already satisfied: requests>=2.20 in /usr/local/lib/python3.10/dist-packages (from openai==0.27.7) (2.32.3)\n",
            "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from openai==0.27.7) (4.66.5)\n",
            "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from openai==0.27.7) (3.10.10)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (3.4.0)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (2.2.3)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (2024.8.30)\n",
            "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (2.4.3)\n",
            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (1.3.1)\n",
            "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (24.2.0)\n",
            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (1.4.1)\n",
            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (6.1.0)\n",
            "Requirement already satisfied: yarl<2.0,>=1.12.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (1.15.2)\n",
            "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (4.0.3)\n",
            "Requirement already satisfied: typing-extensions>=4.1.0 in /usr/local/lib/python3.10/dist-packages (from multidict<7.0,>=4.5->aiohttp->openai==0.27.7) (4.12.2)\n",
            "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from yarl<2.0,>=1.12.0->aiohttp->openai==0.27.7) (0.2.0)\n",
            "Downloading openai-0.27.7-py3-none-any.whl (71 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.0/72.0 kB\u001b[0m \u001b[31m2.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hInstalling collected packages: openai\n",
            "Successfully installed openai-0.27.7\n"
          ]
        }
      ],
      "source": [
        "# With this operation, a comprehensive language model is downloaded from the 'spacy' library. There are three versions to it:\n",
        "# - Large\n",
        "# - Medium\n",
        "# - Small\n",
        "# In this case, we are using the smaller model, which is around 30 MB.\n",
        "\n",
        "!python -m spacy download en_core_web_sm\n",
        "import locale\n",
        "def getpreferredencoding(do_setlocale = True):\n",
        "    return \"UTF-8\"\n",
        "locale.getpreferredencoding = getpreferredencoding\n",
        "!pip install openai==0.27.7"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "PYwCDXQqToJB",
        "outputId": "39200ca1-b642-4301-8d9e-27bab5f90351"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Mounted at /content/drive\n"
          ]
        }
      ],
      "source": [
        "# drive.mount() loads the contents from your Google Drive.\n",
        "\n",
        "from google.colab import drive\n",
        "drive.mount('/content/drive')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "zbNK7QRvCZtR",
        "outputId": "882d37c2-358f-4b65-aed3-3df183c7da66"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Collecting gradio\n",
            "  Downloading gradio-5.1.0-py3-none-any.whl.metadata (15 kB)\n",
            "Collecting aiofiles<24.0,>=22.0 (from gradio)\n",
            "  Downloading aiofiles-23.2.1-py3-none-any.whl.metadata (9.7 kB)\n",
            "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
            "Collecting fastapi<1.0 (from gradio)\n",
            "  Downloading fastapi-0.115.2-py3-none-any.whl.metadata (27 kB)\n",
            "Collecting ffmpy (from gradio)\n",
            "  Downloading ffmpy-0.4.0-py3-none-any.whl.metadata (2.9 kB)\n",
            "Collecting gradio-client==1.4.0 (from gradio)\n",
            "  Downloading gradio_client-1.4.0-py3-none-any.whl.metadata (7.1 kB)\n",
            "Collecting httpx>=0.24.1 (from gradio)\n",
            "  Downloading httpx-0.27.2-py3-none-any.whl.metadata (7.1 kB)\n",
            "Collecting huggingface-hub>=0.25.1 (from gradio)\n",
            "  Downloading huggingface_hub-0.26.1-py3-none-any.whl.metadata (13 kB)\n",
            "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.4)\n",
            "Collecting markupsafe~=2.0 (from gradio)\n",
            "  Downloading MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.0 kB)\n",
            "Requirement already satisfied: numpy<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.26.4)\n",
            "Collecting orjson~=3.0 (from gradio)\n",
            "  Downloading orjson-3.10.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (50 kB)\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.6/50.6 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hRequirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (24.1)\n",
            "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.2.2)\n",
            "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (10.4.0)\n",
            "Requirement already satisfied: pydantic>=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.9.2)\n",
            "Collecting pydub (from gradio)\n",
            "  Downloading pydub-0.25.1-py2.py3-none-any.whl.metadata (1.4 kB)\n",
            "Collecting python-multipart>=0.0.9 (from gradio)\n",
            "  Downloading python_multipart-0.0.12-py3-none-any.whl.metadata (1.9 kB)\n",
            "Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.2)\n",
            "Collecting ruff>=0.2.2 (from gradio)\n",
            "  Downloading ruff-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (25 kB)\n",
            "Collecting semantic-version~=2.0 (from gradio)\n",
            "  Downloading semantic_version-2.10.0-py2.py3-none-any.whl.metadata (9.7 kB)\n",
            "Collecting tomlkit==0.12.0 (from gradio)\n",
            "  Downloading tomlkit-0.12.0-py3-none-any.whl.metadata (2.7 kB)\n",
            "Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.5)\n",
            "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.12.2)\n",
            "Collecting uvicorn>=0.14.0 (from gradio)\n",
            "  Downloading uvicorn-0.32.0-py3-none-any.whl.metadata (6.6 kB)\n",
            "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.4.0->gradio) (2024.6.1)\n",
            "Collecting websockets<13.0,>=10.0 (from gradio-client==1.4.0->gradio)\n",
            "  Downloading websockets-12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB)\n",
            "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (3.10)\n",
            "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
            "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.2.2)\n",
            "Collecting starlette<0.41.0,>=0.37.2 (from fastapi<1.0->gradio)\n",
            "  Downloading starlette-0.40.0-py3-none-any.whl.metadata (6.0 kB)\n",
            "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (2024.8.30)\n",
            "Collecting httpcore==1.* (from httpx>=0.24.1->gradio)\n",
            "  Downloading httpcore-1.0.6-py3-none-any.whl.metadata (21 kB)\n",
            "Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx>=0.24.1->gradio)\n",
            "  Downloading h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.25.1->gradio) (3.16.1)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.25.1->gradio) (2.32.3)\n",
            "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.25.1->gradio) (4.66.5)\n",
            "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.2)\n",
            "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.2)\n",
            "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (0.7.0)\n",
            "Requirement already satisfied: pydantic-core==2.23.4 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (2.23.4)\n",
            "Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (8.1.7)\n",
            "Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
            "Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (13.9.2)\n",
            "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas<3.0,>=1.0->gradio) (1.16.0)\n",
            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.18.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.25.1->gradio) (3.4.0)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.25.1->gradio) (2.2.3)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n",
            "Downloading gradio-5.1.0-py3-none-any.whl (42.3 MB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m42.3/42.3 MB\u001b[0m \u001b[31m20.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading gradio_client-1.4.0-py3-none-any.whl (319 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m319.8/319.8 kB\u001b[0m \u001b[31m22.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading tomlkit-0.12.0-py3-none-any.whl (37 kB)\n",
            "Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)\n",
            "Downloading fastapi-0.115.2-py3-none-any.whl (94 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m94.7/94.7 kB\u001b[0m \u001b[31m7.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading httpx-0.27.2-py3-none-any.whl (76 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m76.4/76.4 kB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading httpcore-1.0.6-py3-none-any.whl (78 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.0/78.0 kB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading huggingface_hub-0.26.1-py3-none-any.whl (447 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m447.4/447.4 kB\u001b[0m \u001b[31m34.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)\n",
            "Downloading orjson-3.10.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (144 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m144.5/144.5 kB\u001b[0m \u001b[31m12.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading python_multipart-0.0.12-py3-none-any.whl (23 kB)\n",
            "Downloading ruff-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.9 MB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.9/10.9 MB\u001b[0m \u001b[31m68.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)\n",
            "Downloading uvicorn-0.32.0-py3-none-any.whl (63 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m63.7/63.7 kB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading ffmpy-0.4.0-py3-none-any.whl (5.8 kB)\n",
            "Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n",
            "Downloading h11-0.14.0-py3-none-any.whl (58 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading starlette-0.40.0-py3-none-any.whl (73 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m73.3/73.3 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading websockets-12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (130 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m130.2/130.2 kB\u001b[0m \u001b[31m11.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hInstalling collected packages: pydub, websockets, tomlkit, semantic-version, ruff, python-multipart, orjson, markupsafe, h11, ffmpy, aiofiles, uvicorn, starlette, huggingface-hub, httpcore, httpx, fastapi, gradio-client, gradio\n",
            "  Attempting uninstall: markupsafe\n",
            "    Found existing installation: MarkupSafe 3.0.1\n",
            "    Uninstalling MarkupSafe-3.0.1:\n",
            "      Successfully uninstalled MarkupSafe-3.0.1\n",
            "  Attempting uninstall: huggingface-hub\n",
            "    Found existing installation: huggingface-hub 0.24.7\n",
            "    Uninstalling huggingface-hub-0.24.7:\n",
            "      Successfully uninstalled huggingface-hub-0.24.7\n",
            "Successfully installed aiofiles-23.2.1 fastapi-0.115.2 ffmpy-0.4.0 gradio-5.1.0 gradio-client-1.4.0 h11-0.14.0 httpcore-1.0.6 httpx-0.27.2 huggingface-hub-0.26.1 markupsafe-2.1.5 orjson-3.10.9 pydub-0.25.1 python-multipart-0.0.12 ruff-0.7.0 semantic-version-2.10.0 starlette-0.40.0 tomlkit-0.12.0 uvicorn-0.32.0 websockets-12.0\n"
          ]
        }
      ],
      "source": [
        "!pip install gradio"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "JLhZWcJjiKCj",
        "outputId": "8c9d803c-5611-43ff-83ee-b58006f41d30"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Collecting sentence-transformers\n",
            "  Downloading sentence_transformers-3.2.1-py3-none-any.whl.metadata (10 kB)\n",
            "Collecting rank_bm25\n",
            "  Downloading rank_bm25-0.2.2-py3-none-any.whl.metadata (3.2 kB)\n",
            "Requirement already satisfied: transformers<5.0.0,>=4.41.0 in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (4.44.2)\n",
            "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (4.66.5)\n",
            "Requirement already satisfied: torch>=1.11.0 in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (2.4.1+cu121)\n",
            "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (1.5.2)\n",
            "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (1.13.1)\n",
            "Requirement already satisfied: huggingface-hub>=0.20.0 in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (0.26.1)\n",
            "Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (10.4.0)\n",
            "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from rank_bm25) (1.26.4)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (3.16.1)\n",
            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2024.6.1)\n",
            "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (24.1)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (6.0.2)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2.32.3)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (4.12.2)\n",
            "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.11.0->sentence-transformers) (1.13.3)\n",
            "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.11.0->sentence-transformers) (3.4.1)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.11.0->sentence-transformers) (3.1.4)\n",
            "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2024.9.11)\n",
            "Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.4.5)\n",
            "Requirement already satisfied: tokenizers<0.20,>=0.19 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.19.1)\n",
            "Requirement already satisfied: joblib>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->sentence-transformers) (1.4.2)\n",
            "Requirement already satisfied: threadpoolctl>=3.1.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->sentence-transformers) (3.5.0)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.11.0->sentence-transformers) (2.1.5)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (3.4.0)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (2.2.3)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (2024.8.30)\n",
            "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.11.0->sentence-transformers) (1.3.0)\n",
            "Downloading sentence_transformers-3.2.1-py3-none-any.whl (255 kB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m255.8/255.8 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading rank_bm25-0.2.2-py3-none-any.whl (8.6 kB)\n",
            "Installing collected packages: rank_bm25, sentence-transformers\n",
            "Successfully installed rank_bm25-0.2.2 sentence-transformers-3.2.1\n"
          ]
        }
      ],
      "source": [
        "!pip install -U sentence-transformers rank_bm25"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "XeaTl-n7iOv3",
        "outputId": "4c95899d-23b8-420d-b73d-35154cf9886a"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/sentence_transformers/cross_encoder/CrossEncoder.py:13: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
            "  from tqdm.autonotebook import tqdm, trange\n"
          ]
        }
      ],
      "source": [
        "import json\n",
        "import pandas as pd\n",
        "import time\n",
        "import spacy\n",
        "from spacy.lang.en.stop_words import STOP_WORDS\n",
        "from string import punctuation\n",
        "from collections import Counter\n",
        "from heapq import nlargest\n",
        "import nltk\n",
        "import numpy as np\n",
        "from tqdm import tqdm\n",
        "from sentence_transformers import SentenceTransformer, util\n",
        "# import tiktoken\n",
        "from openai.embeddings_utils import get_embedding, cosine_similarity"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "h1-YMQLK9zMW"
      },
      "source": [
        "Read the data for Paris Hotels"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "eP9CxWoRjq0_"
      },
      "outputs": [],
      "source": [
        "import pandas as pd\n",
        "df = pd.read_csv('https://raw.githubusercontent.com/hamzafarooq/maven-mlsystem-design-cohort-1/main/data/paris_02_11_23.csv')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 591
        },
        "id": "mAqK7EdVRSd0",
        "outputId": "75ea6544-a029-4b95-b8dd-961384e34b0d"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "\n",
              "                          author_id author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941      Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7   QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B     aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8  jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912     VikaasK         VikaasK   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-09aae531-9384-4b79-8c25-a3f416f9f156\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-09aae531-9384-4b79-8c25-a3f416f9f156')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-09aae531-9384-4b79-8c25-a3f416f9f156 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-09aae531-9384-4b79-8c25-a3f416f9f156');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-3c86b5ee-d093-4e6b-be95-34b0b77a5fe1\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-3c86b5ee-d093-4e6b-be95-34b0b77a5fe1')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-3c86b5ee-d093-4e6b-be95-34b0b77a5fe1 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df",
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 28694,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 124593668,\n        \"min\": 164526208,\n        \"max\": 864678776,\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          669536692,\n          659579136,\n          465497336\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 2034,\n        \"samples\": [\n          \"2022-04-21\",\n          \"2021-08-02\",\n          \"2017-08-07\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 5,\n        \"samples\": [\n          4,\n          3,\n          5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 10041,\n        \"samples\": [\n          \"Perfect for us\",\n          \"Great Location, a lot of space and great staff\",\n          \"Great Location - Great Service\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"Location was super, hotel was clean convenient and value for money paid, Very close to nice restaurants and carers as well to various means of transportation, the hotel was clean with quality bathing stuff.\",\n          \"This hotel appears to have been recently renovated.  My room, small as they all are in Paris, was very well appointed, spotless, a very good shower and all the amenities.  The staff were excellent and very helpful.  The area is perfect.  Very close to the St. Paul Metro stop and all the restaurants and shops in Place des Vosges and Rue Saint Antoine.  I've stayed in other three star hotels in the area and this one is, by far, the best.\",\n          \"The hotel is well located, it's about 800m far from Arc the triumph. Wonderful breakfast and room. There is Wi-Fi available from everywhere in the hotel. We had some problems, the shower didn't heat water in one day, the manager increased extra fee for my child (even when we informed his age, previously by email and they confirmed the prices). All other things were perfect!!!!\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": -1,\n        \"max\": 40,\n        \"num_unique_values\": 15,\n        \"samples\": [\n          9,\n          -1,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d228758-r669536692-Hotel_Plaza_Etoile-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d636096-r659579136-Hotel_Turenne_Le_Marais-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d1790107-r465497336-Hotel_Le_46-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"MOBILE\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"96D7A3BF4690A5843721CE13287A17D8\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 11284,\n        \"samples\": [\n          \"tcmerge\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"ameda2018\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 156,\n        \"samples\": [\n          \"Paris Marriott Champs Elysees Hotel\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 4727120,\n        \"min\": 188738,\n        \"max\": 24042238,\n        \"num_unique_values\": 156,\n        \"samples\": [\n          197935\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 67,\n        \"samples\": [\n          \"Hotel Alhambra is located in a lively district of Paris, 400 metres from Place de la R\\u00e9publique. It features design decoration, a 400 m\\u00b2 private garden and a 24-hour reception with ticket service and offers an airport shuttle.The soundproofed guest rooms are equipped with a flat-screen TV with satellite channels and free Wi-Fi access. Most rooms offer a view of the garden and each room has a private bathroom with a walk-in shower.Every morning, a buffet breakfast is served and can be enjoyed in the comfort of guest rooms or in the garden. Guests can dine on the shaded terrace set in the flowery garden. Traditional restaurants are located just 40 metres away.Popular entertainment venues, the Cirque d'Hiver and the Bataclan are just 100 metres from the hotel. Oberkampf Metro Station is just 40 metres away and provides access to Place de la Bastille. The lively Marais district is 200 metres from the hotel.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.2747059367138602,\n        \"min\": 4.0,\n        \"max\": 5.0,\n        \"num_unique_values\": 3,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 992.5192823072337,\n        \"min\": 58.0,\n        \"max\": 4438.0,\n        \"num_unique_values\": 74,\n        \"samples\": [\n          450.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 76,\n        \"samples\": [\n          \"['roomFeatures_soundproof rooms', 'roomFeatures_desk', 'roomFeatures_safe', 'roomFeatures_flatscreen tv', 'roomFeatures_bath / shower', 'roomFeatures_hair dryer', 'roomTypes_bridal suite', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'propertyAmenities_free high speed internet (wifi)', 'propertyAmenities_free breakfast', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access', 'propertyAmenities_baggage storage', 'propertyAmenities_concierge', 'propertyAmenities_24-hour front desk', 'propertyAmenities_express check-in / check-out']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 7
        }
      ],
      "source": [
        "df.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "kQRrYpYwjuah",
        "outputId": "82a37977-1193-4b8f-f17f-68a72c6ab5d6"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "(28694, 18)"
            ]
          },
          "metadata": {},
          "execution_count": 8
        }
      ],
      "source": [
        "df.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 490
        },
        "id": "kV4dZfFJAn7w",
        "outputId": "ed83d8b5-b0ef-41a7-9860-b92394e6ab68"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "name\n",
              "Hotel d'Angleterre, Saint Germain des Pres              960\n",
              "InterContinental Paris - Le Grand                       800\n",
              "Hotel Marceau Champs Elysees                            800\n",
              "Sonder Atala Champs-Élysées                             800\n",
              "Hotel Dauphine Saint Germain                            800\n",
              "                                                       ... \n",
              "Hotel B55                                                94\n",
              "Les Jardins du Faubourg                                  78\n",
              "Ibis Styles Paris Meteor Avenue de la Porte d'Italie     62\n",
              "Hotel Maxim Folies                                       54\n",
              "Mama Shelter Paris West                                  40\n",
              "Name: count, Length: 156, dtype: int64"
            ],
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>count</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>name</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>Hotel d'Angleterre, Saint Germain des Pres</th>\n",
              "      <td>960</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>InterContinental Paris - Le Grand</th>\n",
              "      <td>800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Marceau Champs Elysees</th>\n",
              "      <td>800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Sonder Atala Champs-Élysées</th>\n",
              "      <td>800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Dauphine Saint Germain</th>\n",
              "      <td>800</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel B55</th>\n",
              "      <td>94</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Les Jardins du Faubourg</th>\n",
              "      <td>78</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Ibis Styles Paris Meteor Avenue de la Porte d'Italie</th>\n",
              "      <td>62</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Maxim Folies</th>\n",
              "      <td>54</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mama Shelter Paris West</th>\n",
              "      <td>40</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>156 rows × 1 columns</p>\n",
              "</div><br><label><b>dtype:</b> int64</label>"
            ]
          },
          "metadata": {},
          "execution_count": 9
        }
      ],
      "source": [
        "# Count the number of times a specific name appears in the 'name' column, and relay that number for each different name, in order.\n",
        "df.name.value_counts()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "n2605_rpAUB4"
      },
      "outputs": [],
      "source": [
        "# Drop the duplicated values from each column, i.e. drop a row if it contains a duplicated value.\n",
        "\n",
        "df=df.drop_duplicates()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "iUFefj6u4MNz",
        "outputId": "d54a1aca-364a-4f0c-920a-83eb0775f013"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "(11990, 18)"
            ]
          },
          "metadata": {},
          "execution_count": 11
        }
      ],
      "source": [
        "df.shape"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "vZFHTET9GAWV"
      },
      "source": [
        "Create a new folder in Google Drive - called \"Semantic_Search\""
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 490
        },
        "id": "ubCoFeP1Gile",
        "outputId": "c0f7e5e7-2af9-459b-de3f-be63cc8bce98"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "name\n",
              "InterContinental Paris - Le Grand                       80\n",
              "Okko Hotels Paris Porte de Versailles                   80\n",
              "Citadines Montmartre Paris                              80\n",
              "Hotel Montfleuri                                        80\n",
              "Hotel Cayre                                             80\n",
              "                                                        ..\n",
              "Seven Hotel Paris                                       32\n",
              "Ibis Styles Paris Meteor Avenue de la Porte d'Italie    31\n",
              "Hotel Du Sentier                                        28\n",
              "Hotel Maxim Folies                                      27\n",
              "Mama Shelter Paris West                                 20\n",
              "Name: count, Length: 156, dtype: int64"
            ],
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>count</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>name</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>InterContinental Paris - Le Grand</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Okko Hotels Paris Porte de Versailles</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Citadines Montmartre Paris</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Montfleuri</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Cayre</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Seven Hotel Paris</th>\n",
              "      <td>32</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Ibis Styles Paris Meteor Avenue de la Porte d'Italie</th>\n",
              "      <td>31</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Du Sentier</th>\n",
              "      <td>28</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Maxim Folies</th>\n",
              "      <td>27</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mama Shelter Paris West</th>\n",
              "      <td>20</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>156 rows × 1 columns</p>\n",
              "</div><br><label><b>dtype:</b> int64</label>"
            ]
          },
          "metadata": {},
          "execution_count": 12
        }
      ],
      "source": [
        "df.name.value_counts()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "SxAHKLTjGOsM",
        "outputId": "7e41e610-f30d-40c5-be79-8c7fbbad9700"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "mkdir: cannot create directory ‘/content/drive/MyDrive/Semantic_Search’: File exists\n"
          ]
        }
      ],
      "source": [
        "# Make a folder in your drive folder called \"Semantic_Search\".\n",
        "!mkdir /content/drive/MyDrive/Semantic_Search"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "H3oj6axR9-uq"
      },
      "outputs": [],
      "source": [
        "# Save the dataframe to the folder you just creagted.\n",
        "df.to_csv('/content/drive/MyDrive/Semantic_Search/paris_02_11_23.csv',index=False)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "pSf3x-60Ada7",
        "outputId": "e35cf1d0-0c87-42e6-be5d-b4d4b8224097"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "(11990, 18)"
            ]
          },
          "metadata": {},
          "execution_count": 13
        }
      ],
      "source": [
        "df.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 489
        },
        "id": "34KBfe8rAhUq",
        "outputId": "72e47577-90b0-4fb7-ed41-2f047a6f728d"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "name\n",
              "Grand Hotel des Balcons                                 80\n",
              "InterContinental Paris - Le Grand                       80\n",
              "Renaissance Paris Vendome Hotel                         80\n",
              "Renaissance Paris Nobel Tour Eiffel Hotel               80\n",
              "Citadines Bastille Marais Paris                         80\n",
              "                                                        ..\n",
              "Seven Hotel Paris                                       32\n",
              "Ibis Styles Paris Meteor Avenue de la Porte d'Italie    31\n",
              "Hotel Du Sentier                                        28\n",
              "Hotel Maxim Folies                                      27\n",
              "Mama Shelter Paris West                                 20\n",
              "Name: count, Length: 156, dtype: int64"
            ],
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>count</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>name</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>Grand Hotel des Balcons</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>InterContinental Paris - Le Grand</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Renaissance Paris Vendome Hotel</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Renaissance Paris Nobel Tour Eiffel Hotel</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Citadines Bastille Marais Paris</th>\n",
              "      <td>80</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Seven Hotel Paris</th>\n",
              "      <td>32</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Ibis Styles Paris Meteor Avenue de la Porte d'Italie</th>\n",
              "      <td>31</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Du Sentier</th>\n",
              "      <td>28</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Hotel Maxim Folies</th>\n",
              "      <td>27</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mama Shelter Paris West</th>\n",
              "      <td>20</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>156 rows × 1 columns</p>\n",
              "</div><br><label><b>dtype:</b> int64</label>"
            ]
          },
          "metadata": {},
          "execution_count": 14
        }
      ],
      "source": [
        "df.name.value_counts()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 590
        },
        "id": "Y-0_6FKzJrO-",
        "outputId": "2415995c-60da-4f92-ef1f-88d8cdbb145e"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "\n",
              "                          author_id author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941      Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7   QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B     aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8  jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912     VikaasK         VikaasK   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...  \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-4270e54a-0b57-4693-8131-614d11da3f70\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-4270e54a-0b57-4693-8131-614d11da3f70')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-4270e54a-0b57-4693-8131-614d11da3f70 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-4270e54a-0b57-4693-8131-614d11da3f70');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-2abaa6db-2dc6-42fa-a35c-bd1865f2ed5b\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-2abaa6db-2dc6-42fa-a35c-bd1865f2ed5b')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-2abaa6db-2dc6-42fa-a35c-bd1865f2ed5b button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df",
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 11990,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 122256454,\n        \"min\": 164526208,\n        \"max\": 864678776,\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          669536692,\n          659579136,\n          465497336\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 2034,\n        \"samples\": [\n          \"2022-04-21\",\n          \"2021-08-02\",\n          \"2017-08-07\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 5,\n        \"samples\": [\n          4,\n          3,\n          5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10041,\n        \"samples\": [\n          \"Perfect for us\",\n          \"Great Location, a lot of space and great staff\",\n          \"Great Location - Great Service\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"Location was super, hotel was clean convenient and value for money paid, Very close to nice restaurants and carers as well to various means of transportation, the hotel was clean with quality bathing stuff.\",\n          \"This hotel appears to have been recently renovated.  My room, small as they all are in Paris, was very well appointed, spotless, a very good shower and all the amenities.  The staff were excellent and very helpful.  The area is perfect.  Very close to the St. Paul Metro stop and all the restaurants and shops in Place des Vosges and Rue Saint Antoine.  I've stayed in other three star hotels in the area and this one is, by far, the best.\",\n          \"The hotel is well located, it's about 800m far from Arc the triumph. Wonderful breakfast and room. There is Wi-Fi available from everywhere in the hotel. We had some problems, the shower didn't heat water in one day, the manager increased extra fee for my child (even when we informed his age, previously by email and they confirmed the prices). All other things were perfect!!!!\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": -1,\n        \"max\": 40,\n        \"num_unique_values\": 15,\n        \"samples\": [\n          9,\n          -1,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d228758-r669536692-Hotel_Plaza_Etoile-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d636096-r659579136-Hotel_Turenne_Le_Marais-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d1790107-r465497336-Hotel_Le_46-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"MOBILE\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"96D7A3BF4690A5843721CE13287A17D8\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11284,\n        \"samples\": [\n          \"tcmerge\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"ameda2018\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 156,\n        \"samples\": [\n          \"Paris Marriott Champs Elysees Hotel\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 4801568,\n        \"min\": 188738,\n        \"max\": 24042238,\n        \"num_unique_values\": 156,\n        \"samples\": [\n          197935\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 67,\n        \"samples\": [\n          \"Hotel Alhambra is located in a lively district of Paris, 400 metres from Place de la R\\u00e9publique. It features design decoration, a 400 m\\u00b2 private garden and a 24-hour reception with ticket service and offers an airport shuttle.The soundproofed guest rooms are equipped with a flat-screen TV with satellite channels and free Wi-Fi access. Most rooms offer a view of the garden and each room has a private bathroom with a walk-in shower.Every morning, a buffet breakfast is served and can be enjoyed in the comfort of guest rooms or in the garden. Guests can dine on the shaded terrace set in the flowery garden. Traditional restaurants are located just 40 metres away.Popular entertainment venues, the Cirque d'Hiver and the Bataclan are just 100 metres from the hotel. Oberkampf Metro Station is just 40 metres away and provides access to Place de la Bastille. The lively Marais district is 200 metres from the hotel.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.2891668380465141,\n        \"min\": 4.0,\n        \"max\": 5.0,\n        \"num_unique_values\": 3,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 901.539832833028,\n        \"min\": 58.0,\n        \"max\": 4438.0,\n        \"num_unique_values\": 74,\n        \"samples\": [\n          450.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 76,\n        \"samples\": [\n          \"['roomFeatures_soundproof rooms', 'roomFeatures_desk', 'roomFeatures_safe', 'roomFeatures_flatscreen tv', 'roomFeatures_bath / shower', 'roomFeatures_hair dryer', 'roomTypes_bridal suite', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'propertyAmenities_free high speed internet (wifi)', 'propertyAmenities_free breakfast', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access', 'propertyAmenities_baggage storage', 'propertyAmenities_concierge', 'propertyAmenities_24-hour front desk', 'propertyAmenities_express check-in / check-out']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 15
        }
      ],
      "source": [
        "df.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "qVnqTy05jvLR"
      },
      "outputs": [],
      "source": [
        "# Create a column named 'combined', which containes the titles of the different lodges, with the descriptions associated to it.\n",
        "df[\"combined\"] = (\n",
        "    \"title: \" + df.title.str.strip()+\"; Content: \" + df.text.str.strip()\n",
        "    # +\"; desc: \"+ df.text.str.strip()\n",
        ")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 625
        },
        "id": "4dI7cdki4GBF",
        "outputId": "341827dc-ec64-45fd-d5c0-2be7501629d6"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "\n",
              "                          author_id author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941      Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7   QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B     aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8  jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912     VikaasK         VikaasK   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \\\n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "\n",
              "                                            combined  \n",
              "0  title: A large impersonal place with an on tim...  \n",
              "1  title: Good hotel with rude waiter; Content: W...  \n",
              "2  title: Fantastic; Content: Absolutely top-notc...  \n",
              "3  title: Amidst the chaos of Fashion week, their...  \n",
              "4  title: Not worth the effort or money; Content:...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-20b437d6-4f41-4e31-bfaa-082dfd5e5c82\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title: A large impersonal place with an on tim...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title: Good hotel with rude waiter; Content: W...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title: Fantastic; Content: Absolutely top-notc...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title: Amidst the chaos of Fashion week, their...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title: Not worth the effort or money; Content:...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-20b437d6-4f41-4e31-bfaa-082dfd5e5c82')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-20b437d6-4f41-4e31-bfaa-082dfd5e5c82 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-20b437d6-4f41-4e31-bfaa-082dfd5e5c82');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-429a3af4-796a-4e0f-865d-daf17f9c6c02\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-429a3af4-796a-4e0f-865d-daf17f9c6c02')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-429a3af4-796a-4e0f-865d-daf17f9c6c02 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df",
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 11990,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 122256454,\n        \"min\": 164526208,\n        \"max\": 864678776,\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          669536692,\n          659579136,\n          465497336\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 2034,\n        \"samples\": [\n          \"2022-04-21\",\n          \"2021-08-02\",\n          \"2017-08-07\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 5,\n        \"samples\": [\n          4,\n          3,\n          5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10041,\n        \"samples\": [\n          \"Perfect for us\",\n          \"Great Location, a lot of space and great staff\",\n          \"Great Location - Great Service\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"Location was super, hotel was clean convenient and value for money paid, Very close to nice restaurants and carers as well to various means of transportation, the hotel was clean with quality bathing stuff.\",\n          \"This hotel appears to have been recently renovated.  My room, small as they all are in Paris, was very well appointed, spotless, a very good shower and all the amenities.  The staff were excellent and very helpful.  The area is perfect.  Very close to the St. Paul Metro stop and all the restaurants and shops in Place des Vosges and Rue Saint Antoine.  I've stayed in other three star hotels in the area and this one is, by far, the best.\",\n          \"The hotel is well located, it's about 800m far from Arc the triumph. Wonderful breakfast and room. There is Wi-Fi available from everywhere in the hotel. We had some problems, the shower didn't heat water in one day, the manager increased extra fee for my child (even when we informed his age, previously by email and they confirmed the prices). All other things were perfect!!!!\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": -1,\n        \"max\": 40,\n        \"num_unique_values\": 15,\n        \"samples\": [\n          9,\n          -1,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d228758-r669536692-Hotel_Plaza_Etoile-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d636096-r659579136-Hotel_Turenne_Le_Marais-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d1790107-r465497336-Hotel_Le_46-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"MOBILE\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"96D7A3BF4690A5843721CE13287A17D8\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11284,\n        \"samples\": [\n          \"tcmerge\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"ameda2018\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 156,\n        \"samples\": [\n          \"Paris Marriott Champs Elysees Hotel\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 4801568,\n        \"min\": 188738,\n        \"max\": 24042238,\n        \"num_unique_values\": 156,\n        \"samples\": [\n          197935\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 67,\n        \"samples\": [\n          \"Hotel Alhambra is located in a lively district of Paris, 400 metres from Place de la R\\u00e9publique. It features design decoration, a 400 m\\u00b2 private garden and a 24-hour reception with ticket service and offers an airport shuttle.The soundproofed guest rooms are equipped with a flat-screen TV with satellite channels and free Wi-Fi access. Most rooms offer a view of the garden and each room has a private bathroom with a walk-in shower.Every morning, a buffet breakfast is served and can be enjoyed in the comfort of guest rooms or in the garden. Guests can dine on the shaded terrace set in the flowery garden. Traditional restaurants are located just 40 metres away.Popular entertainment venues, the Cirque d'Hiver and the Bataclan are just 100 metres from the hotel. Oberkampf Metro Station is just 40 metres away and provides access to Place de la Bastille. The lively Marais district is 200 metres from the hotel.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.2891668380465141,\n        \"min\": 4.0,\n        \"max\": 5.0,\n        \"num_unique_values\": 3,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 901.539832833028,\n        \"min\": 58.0,\n        \"max\": 4438.0,\n        \"num_unique_values\": 74,\n        \"samples\": [\n          450.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 76,\n        \"samples\": [\n          \"['roomFeatures_soundproof rooms', 'roomFeatures_desk', 'roomFeatures_safe', 'roomFeatures_flatscreen tv', 'roomFeatures_bath / shower', 'roomFeatures_hair dryer', 'roomTypes_bridal suite', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'propertyAmenities_free high speed internet (wifi)', 'propertyAmenities_free breakfast', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access', 'propertyAmenities_baggage storage', 'propertyAmenities_concierge', 'propertyAmenities_24-hour front desk', 'propertyAmenities_express check-in / check-out']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"combined\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11988,\n        \"samples\": [\n          \"title: Another wonderful stay at this great hotel; Content: We have stayed at this hotel many times, most recently for two week-long stays one in late May and the other just last week. The other five-star reviews have covered just about everything \\u2013 the wonderful, comfortable rooms, the great breakfasts and, especially the outstanding staff.  There have been a couple of new hires since our last stay, and they are doing a fine job upholding the hotel\\u2019s traditions of excellent service. Because our stays were long, we twice used their laundry service, which was splendid and reasonably priced.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 15
        }
      ],
      "source": [
        "df.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "-MWu4Lidj3Ur"
      },
      "outputs": [],
      "source": [
        "import re\n",
        "\n",
        "df_combined = df.copy()\n",
        "\n",
        "df_combined['combined'] = df_combined['combined'].apply(lambda x: re.sub('[^a-zA-z0-9\\s]','',str(x)))\n",
        "\n",
        "# Translate all the \"combined\" column to lower case.\n",
        "def lower_case(input_str):\n",
        "    input_str = input_str.lower()\n",
        "    return input_str\n",
        "\n",
        "df_combined['combined']= df_combined['combined'].apply(lambda x: lower_case(x))\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 550,
          "referenced_widgets": [
            "4a00514c81fd449fbfab23d6494cd0c3",
            "3d476ddbe94d4006b3efb17f7515ab6d",
            "dbef8ef709fc4f638fc1c41677eb829e",
            "23fc3261341e46bb8e23177a2a2f4431",
            "d19a03c5c6274687a38ec0f167bd8d01",
            "8ecdb68e693b431aa18a15c61dd1990b",
            "11a5eb96df2a4432b79569a7b8db7f74",
            "d833ca4cd394452c9a0c3353c7e91e6a",
            "835dbc885f94478fa28e5ddba26bd858",
            "22e21dd27f314c4cbddc3f0719310462",
            "2cc6e1fd273b485d9176ebfd41ad3779",
            "852c80cbf54d47bdb60584f44901654b",
            "1792dc504b2743c6930c620f246d937d",
            "818706a8ceb34c138f47bf2587e8701f",
            "598179e13efe41158ca343a6bf61e2e0",
            "8170b6fff6284f9ea35d26b31fe3251f",
            "09af1de5ae37457292074df6c42484f4",
            "d772400a4b124fabb8e24640afa30a7a",
            "33ee2035894646a5a5c76cb84034d487",
            "b4a18fb9d789477ea2e368d711b9f532",
            "67e1bde26615486d9ee1a0e42ed60b91",
            "65792a1a82724e4cb5637f021673f01c",
            "9109820267744f509c5d3a3b147a2640",
            "3c13c0aad7c8431ea18152a577feb854",
            "8c80a7e209534035b857adcb6944bb97",
            "0f92d7441d9e4d4c8432483a68f9b56b",
            "d700563e0695412cbf9b01b7fcb0dd3e",
            "68af25742fb549839a28c9e73a37996f",
            "a43556f0695a4e1bbd4615b3631b799a",
            "d2b2ee76413b419e9006099781bcf93e",
            "b2efbd5de21a445fa25ef75d029e4cfd",
            "7a98450d3d28442ea511e65444c737fb",
            "26908beb24b94cdb9644d704f214082d",
            "ab6c68869e294af3a8f92ed918c346f7",
            "94ae758926654fc1be08df01c66ed856",
            "997d0ce587b244cb82dd76a86256ea30",
            "c4159b8cadf64b82a0737c84b8cba769",
            "c70d1ee9b9874ad58ed60db2e6013d74",
            "9490add0a3af4cfabff51c2dc2c17c47",
            "2d0917a70a764781a360873463566d9c",
            "05dbad55ad2446a3b75a6ecaaed61ec0",
            "bb1ee57d090148b187bd12f5318c465c",
            "8b750423af1a441fab93b8f8887720c2",
            "6cdbd3265969439f9930009c3f9168ea",
            "ef95867de3aa41aa85e7c4a6c1ac731c",
            "0204491e51a94445821c29287d5dd152",
            "00cb6bdbc1ea484ca4839fbeb4ecb397",
            "d510ea73105e4dad91e92dc9ceab509c",
            "bbd541462c754ba4be3f46c478e44058",
            "102c721483484aa29c2bed57982a0bd5",
            "55f9c987fdd645eaa1ae2b9dc7a081bf",
            "de57fd86d8d34cbdb87253d512c0c45e",
            "591694d7617c4233a750d1674d2086e6",
            "5661e15e67834634bb8631b0e68a4a21",
            "6538fde2201b4a97b1cf023104e5c856",
            "2212cebf1de74632bcb591ada4d8d053",
            "a9f4e5752a9c4dafa2a8f208ff14be41",
            "43063dec6fab43b99510ed07f32d70ac",
            "0bd1368448f04c7f912951504754e65a",
            "8e95d6d8be2f4858a94e383d921f2475",
            "4b4324e0bb8d4394b209dfbab7c211eb",
            "0f5dbf4913ad401598874d176d3d60d0",
            "ad88421e165c4d5da2d0115d3153e66d",
            "0f48e4d1a8f24533a36c67cc2f703fb0",
            "09c18520b8e94788b701b06f137ad9c9",
            "7959efcae810424cbea454609a951029",
            "ceb29f720964496f8055f2c81c3eead5",
            "0f0e7a31ad6b4588aa925f420277183e",
            "f3abdd95082046a6bc6b391520d41320",
            "ee99a0a84b0841fdaf5f824303832640",
            "17a234d512364b58a3eecb7c69bcbfa1",
            "ed16f602e42a4c2d93970f580bb1479b",
            "5dbdaf59e5064f57bba4f608762b1fe1",
            "627e60876cc648428934df4927ab6cd9",
            "ce98be17dff84e058af1056b8f71ebb4",
            "99c7806835df4dccaa15c62305160e91",
            "afbaf3e5e8f641a097597b7ceb236c66",
            "b730221503674245967630571d8dd4ac",
            "f41b871bf9b2441587151c829fe1535f",
            "223d1dc305fe4e709002f3e5be752acb",
            "c21a1bac47ef4b31bc3c8f3331d2700f",
            "7d124f0ade55495ea9292179130be92b",
            "8f69949b4bfd4a9ba54ae93c2bafb5e3",
            "396d90e4f45f40828a54e72f02e656e7",
            "2cec2602e01a4e3bb9f86e672d2df936",
            "834a4b133e5d4a818b3d2b595aa8c5be",
            "e6cd0094a13b41078d3cf5c0870cb646",
            "0511498a18634cb1b0b222bf5c2d124b",
            "3eefc31bfda24991b746636c544bd4a9",
            "0cae7bbe65d54414aefe452deb4832cb",
            "85707acbf5a944eba5fe22930305dd90",
            "c75965de469d498ab92c02a62dc9f78f",
            "a07b31a740dd4ef98c3e750de8d2b3bd",
            "ae224be0001f4d9b99877c31cbbf6643",
            "36d3d8e5901f4397bb2e4d9d11e0f5c8",
            "9f412d9733ca4442ad02bfb016013ec6",
            "06ce5e709a6843b0971a90f05aef5f4a",
            "ea3f3c8975a84fa99b90bfe66c185422",
            "26e21b33b41642a2bdbd43926715a882",
            "1487cb2ebcd7422e84be447b78613770",
            "eddbcc5363a94058b7dc662b15c14be4",
            "b99277838bff441a90c1291c10555ef9",
            "cfb00a79a484480d8005f9c1ecf42633",
            "b61ecd00cbca41008f98b547916453ac",
            "381656c53ad846f3bd71e53b70646ded",
            "b16885f4db0f495e92a2cb7a8bc3f233",
            "67259c151da548f78ba50579f68193ec",
            "8a9a98b061934fb1a62b9322b56a72bd",
            "308443e3107a40bdb21bcda2feb65174",
            "b706d0ef94834e3d8ba9d85462443af3",
            "5e8cf12f77f74a9ea5c45276adb72997",
            "7205effdd95940228e17808570d33f0c",
            "13021f948cda4866aca08a0e651f1d72",
            "726912791dc240e898dce9412e2093a2",
            "9805c18c93244f24bf140394fb130c3a",
            "6de2a88fd5424a55bdc5a47b0e4757a0",
            "8ed73b34d54e4c6da45b147a0cd9848f",
            "d51633422c7548b290f00d7097db549c",
            "980855fb7d174f13afe0727e972081f5",
            "219aa78b67db4a63b99e7b57ca289c49",
            "8202dbd5c89447eaad8b54e837ba39e8"
          ]
        },
        "id": "fioMC20Dj__G",
        "outputId": "cf007d2d-52b8-4b34-b20d-3d88835b1b7d"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
            "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
            "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
            "You will be able to reuse this secret in all of your notebooks.\n",
            "Please note that authentication is recommended but still optional to access public models or datasets.\n",
            "  warnings.warn(\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "modules.json:   0%|          | 0.00/349 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "4a00514c81fd449fbfab23d6494cd0c3"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "config_sentence_transformers.json:   0%|          | 0.00/116 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "852c80cbf54d47bdb60584f44901654b"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "README.md:   0%|          | 0.00/10.6k [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "9109820267744f509c5d3a3b147a2640"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "sentence_bert_config.json:   0%|          | 0.00/53.0 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "ab6c68869e294af3a8f92ed918c346f7"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "config.json:   0%|          | 0.00/571 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "ef95867de3aa41aa85e7c4a6c1ac731c"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "model.safetensors:   0%|          | 0.00/438M [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "2212cebf1de74632bcb591ada4d8d053"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "tokenizer_config.json:   0%|          | 0.00/363 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "ceb29f720964496f8055f2c81c3eead5"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "vocab.txt:   0%|          | 0.00/232k [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "b730221503674245967630571d8dd4ac"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "tokenizer.json:   0%|          | 0.00/466k [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "3eefc31bfda24991b746636c544bd4a9"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "special_tokens_map.json:   0%|          | 0.00/239 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "1487cb2ebcd7422e84be447b78613770"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884\n",
            "  warnings.warn(\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "1_Pooling/config.json:   0%|          | 0.00/190 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "5e8cf12f77f74a9ea5c45276adb72997"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "GPU Found!\n"
          ]
        }
      ],
      "source": [
        "import json\n",
        "from sentence_transformers import SentenceTransformer, CrossEncoder, util\n",
        "import gzip\n",
        "import os\n",
        "import torch\n",
        "\n",
        "embedder = SentenceTransformer('all-mpnet-base-v2')\n",
        "\n",
        "# Use the GPU if available\n",
        "if not torch.cuda.is_available():\n",
        "    print(\"Warning: No GPU found. Please add GPU to your notebook\")\n",
        "else:\n",
        "  print(\"GPU Found!\")\n",
        "  embedder =  embedder.to('cuda')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 643
        },
        "id": "H1ghjyTYkKX0",
        "outputId": "5e9835e7-4098-46c5-ca59-c638c8809432"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "\n",
              "                          author_id author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941      Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7   QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B     aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8  jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912     VikaasK         VikaasK   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \\\n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "\n",
              "                                            combined  \n",
              "0  title a large impersonal place with an on time...  \n",
              "1  title good hotel with rude waiter content we w...  \n",
              "2  title fantastic content absolutely topnotch ro...  \n",
              "3  title amidst the chaos of fashion week their s...  \n",
              "4  title not worth the effort or money content th...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-0165bae1-7cd3-4ce2-805b-94373cc24f5d\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title a large impersonal place with an on time...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title good hotel with rude waiter content we w...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title fantastic content absolutely topnotch ro...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title amidst the chaos of fashion week their s...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not worth the effort or money content th...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-0165bae1-7cd3-4ce2-805b-94373cc24f5d')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-0165bae1-7cd3-4ce2-805b-94373cc24f5d button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-0165bae1-7cd3-4ce2-805b-94373cc24f5d');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-e679fe85-aa38-4e96-8830-427314dd2c4a\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-e679fe85-aa38-4e96-8830-427314dd2c4a')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-e679fe85-aa38-4e96-8830-427314dd2c4a button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df_combined",
              "summary": "{\n  \"name\": \"df_combined\",\n  \"rows\": 11990,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 122256454,\n        \"min\": 164526208,\n        \"max\": 864678776,\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          669536692,\n          659579136,\n          465497336\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 2034,\n        \"samples\": [\n          \"2022-04-21\",\n          \"2021-08-02\",\n          \"2017-08-07\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 5,\n        \"samples\": [\n          4,\n          3,\n          5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10041,\n        \"samples\": [\n          \"Perfect for us\",\n          \"Great Location, a lot of space and great staff\",\n          \"Great Location - Great Service\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"Location was super, hotel was clean convenient and value for money paid, Very close to nice restaurants and carers as well to various means of transportation, the hotel was clean with quality bathing stuff.\",\n          \"This hotel appears to have been recently renovated.  My room, small as they all are in Paris, was very well appointed, spotless, a very good shower and all the amenities.  The staff were excellent and very helpful.  The area is perfect.  Very close to the St. Paul Metro stop and all the restaurants and shops in Place des Vosges and Rue Saint Antoine.  I've stayed in other three star hotels in the area and this one is, by far, the best.\",\n          \"The hotel is well located, it's about 800m far from Arc the triumph. Wonderful breakfast and room. There is Wi-Fi available from everywhere in the hotel. We had some problems, the shower didn't heat water in one day, the manager increased extra fee for my child (even when we informed his age, previously by email and they confirmed the prices). All other things were perfect!!!!\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": -1,\n        \"max\": 40,\n        \"num_unique_values\": 15,\n        \"samples\": [\n          9,\n          -1,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d228758-r669536692-Hotel_Plaza_Etoile-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d636096-r659579136-Hotel_Turenne_Le_Marais-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d1790107-r465497336-Hotel_Le_46-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"MOBILE\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"96D7A3BF4690A5843721CE13287A17D8\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11284,\n        \"samples\": [\n          \"tcmerge\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"ameda2018\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 156,\n        \"samples\": [\n          \"Paris Marriott Champs Elysees Hotel\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 4801568,\n        \"min\": 188738,\n        \"max\": 24042238,\n        \"num_unique_values\": 156,\n        \"samples\": [\n          197935\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 67,\n        \"samples\": [\n          \"Hotel Alhambra is located in a lively district of Paris, 400 metres from Place de la R\\u00e9publique. It features design decoration, a 400 m\\u00b2 private garden and a 24-hour reception with ticket service and offers an airport shuttle.The soundproofed guest rooms are equipped with a flat-screen TV with satellite channels and free Wi-Fi access. Most rooms offer a view of the garden and each room has a private bathroom with a walk-in shower.Every morning, a buffet breakfast is served and can be enjoyed in the comfort of guest rooms or in the garden. Guests can dine on the shaded terrace set in the flowery garden. Traditional restaurants are located just 40 metres away.Popular entertainment venues, the Cirque d'Hiver and the Bataclan are just 100 metres from the hotel. Oberkampf Metro Station is just 40 metres away and provides access to Place de la Bastille. The lively Marais district is 200 metres from the hotel.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.2891668380465141,\n        \"min\": 4.0,\n        \"max\": 5.0,\n        \"num_unique_values\": 3,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 901.539832833028,\n        \"min\": 58.0,\n        \"max\": 4438.0,\n        \"num_unique_values\": 74,\n        \"samples\": [\n          450.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 76,\n        \"samples\": [\n          \"['roomFeatures_soundproof rooms', 'roomFeatures_desk', 'roomFeatures_safe', 'roomFeatures_flatscreen tv', 'roomFeatures_bath / shower', 'roomFeatures_hair dryer', 'roomTypes_bridal suite', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'propertyAmenities_free high speed internet (wifi)', 'propertyAmenities_free breakfast', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access', 'propertyAmenities_baggage storage', 'propertyAmenities_concierge', 'propertyAmenities_24-hour front desk', 'propertyAmenities_express check-in / check-out']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"combined\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11989,\n        \"samples\": [\n          \"title jeniuous hotel location content location was super hotel was clean convenient and value for money paid very close to nice restaurants and carers as well to various means of transportation the hotel was clean with quality bathing stuff\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 18
        }
      ],
      "source": [
        "df_combined.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "S3WxiVZykgEp"
      },
      "outputs": [],
      "source": [
        "# Take a sample of the first 10 rows.\n",
        "sample = df_combined[:10]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 921
        },
        "id": "ZakG4Hr2Oosh",
        "outputId": "0490b257-2d0e-4793-9257-cf88ae4d1352"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "5  862073785  2022-09-26              4   \n",
              "6  861021031  2022-09-20              5   \n",
              "7  860421664  2022-09-16              5   \n",
              "8  856124006  2022-08-24              5   \n",
              "9  856016947  2022-08-23              5   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "5         Not quite up to Intercontinental standards   \n",
              "6                    Luxury in the heart of the city   \n",
              "7                                          Beautiful   \n",
              "8                Great old fashioned quality service   \n",
              "9          Best location and platform to visit Paris   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "5  We had a one night stay prior to taking the Eu...      0   \n",
              "6  We were very impressed with the intercontinent...      0   \n",
              "7  Visited for my birthday and everything was jus...      0   \n",
              "8  All I can say is we found good old fashioned f...      1   \n",
              "9  Our family of 4 plus a friend enjoyed the grea...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "5  /ShowUserReviews-g187147-d207742-r862073785-In...       en   MOBILE   \n",
              "6  /ShowUserReviews-g187147-d207742-r861021031-In...       en    OTHER   \n",
              "7  /ShowUserReviews-g187147-d207742-r860421664-In...       en    OTHER   \n",
              "8  /ShowUserReviews-g187147-d207742-r856124006-In...       en    OTHER   \n",
              "9  /ShowUserReviews-g187147-d207742-r856016947-In...       en   MOBILE   \n",
              "\n",
              "                          author_id    author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941         Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7      QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B        aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8     jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912        VikaasK         VikaasK   \n",
              "5  BA9F96090F35C7A562E550825BAB4B32  badgerken2019   badgerken2019   \n",
              "6  CB65D8DF04EEB78702BB03F39BAC6717      BadBenito       BadBenito   \n",
              "7  9D8328D86D62AFA560367B6F81565010    Shivers2612     Shivers2612   \n",
              "8  82C9562F2314BE52F0CD417EC6034CE2         Nouf M        noufm716   \n",
              "9  266247D26801AA5B479974849CAA8210       JanKritz        JanKritz   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "5  InterContinental Paris - Le Grand  207742   \n",
              "6  InterContinental Paris - Le Grand  207742   \n",
              "7  InterContinental Paris - Le Grand  207742   \n",
              "8  InterContinental Paris - Le Grand  207742   \n",
              "9  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "5  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "6  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "7  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "8  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "9  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \\\n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "5  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "6  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "7  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "8  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "9  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "\n",
              "                                            combined  \n",
              "0  title a large impersonal place with an on time...  \n",
              "1  title good hotel with rude waiter content we w...  \n",
              "2  title fantastic content absolutely topnotch ro...  \n",
              "3  title amidst the chaos of fashion week their s...  \n",
              "4  title not worth the effort or money content th...  \n",
              "5  title not quite up to intercontinental standar...  \n",
              "6  title luxury in the heart of the city content ...  \n",
              "7  title beautiful content visited for my birthda...  \n",
              "8  title great old fashioned quality service cont...  \n",
              "9  title best location and platform to visit pari...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-d056b4af-5972-403d-ab8c-484909e35b94\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title a large impersonal place with an on time...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title good hotel with rude waiter content we w...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title fantastic content absolutely topnotch ro...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title amidst the chaos of fashion week their s...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not worth the effort or money content th...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>862073785</td>\n",
              "      <td>2022-09-26</td>\n",
              "      <td>4</td>\n",
              "      <td>Not quite up to Intercontinental standards</td>\n",
              "      <td>We had a one night stay prior to taking the Eu...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r862073785-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>BA9F96090F35C7A562E550825BAB4B32</td>\n",
              "      <td>badgerken2019</td>\n",
              "      <td>badgerken2019</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not quite up to intercontinental standar...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>861021031</td>\n",
              "      <td>2022-09-20</td>\n",
              "      <td>5</td>\n",
              "      <td>Luxury in the heart of the city</td>\n",
              "      <td>We were very impressed with the intercontinent...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r861021031-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>CB65D8DF04EEB78702BB03F39BAC6717</td>\n",
              "      <td>BadBenito</td>\n",
              "      <td>BadBenito</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title luxury in the heart of the city content ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>860421664</td>\n",
              "      <td>2022-09-16</td>\n",
              "      <td>5</td>\n",
              "      <td>Beautiful</td>\n",
              "      <td>Visited for my birthday and everything was jus...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r860421664-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>9D8328D86D62AFA560367B6F81565010</td>\n",
              "      <td>Shivers2612</td>\n",
              "      <td>Shivers2612</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title beautiful content visited for my birthda...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>856124006</td>\n",
              "      <td>2022-08-24</td>\n",
              "      <td>5</td>\n",
              "      <td>Great old fashioned quality service</td>\n",
              "      <td>All I can say is we found good old fashioned f...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r856124006-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>82C9562F2314BE52F0CD417EC6034CE2</td>\n",
              "      <td>Nouf M</td>\n",
              "      <td>noufm716</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title great old fashioned quality service cont...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>856016947</td>\n",
              "      <td>2022-08-23</td>\n",
              "      <td>5</td>\n",
              "      <td>Best location and platform to visit Paris</td>\n",
              "      <td>Our family of 4 plus a friend enjoyed the grea...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r856016947-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>266247D26801AA5B479974849CAA8210</td>\n",
              "      <td>JanKritz</td>\n",
              "      <td>JanKritz</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title best location and platform to visit pari...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-d056b4af-5972-403d-ab8c-484909e35b94')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-d056b4af-5972-403d-ab8c-484909e35b94 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-d056b4af-5972-403d-ab8c-484909e35b94');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-01a0d0d6-7a34-43f6-b015-a7b1d4b35242\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-01a0d0d6-7a34-43f6-b015-a7b1d4b35242')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-01a0d0d6-7a34-43f6-b015-a7b1d4b35242 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "  <div id=\"id_c1fee04e-1a38-4778-8e7b-c2e1066ca702\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('sample')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_c1fee04e-1a38-4778-8e7b-c2e1066ca702 button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('sample');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "sample",
              "summary": "{\n  \"name\": \"sample\",\n  \"rows\": 10,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3175909,\n        \"min\": 856016947,\n        \"max\": 864290614,\n        \"num_unique_values\": 10,\n        \"samples\": [\n          856124006,\n          864049819,\n          862073785\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 9,\n        \"samples\": [\n          \"2022-08-24\",\n          \"2022-10-10\",\n          \"2022-09-20\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 4,\n        \"samples\": [\n          4,\n          2,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"Great old fashioned quality service\",\n          \"Good hotel with rude waiter\",\n          \"Not quite up to Intercontinental standards\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"All I can say is we found good old fashioned five star service in this hotel. This is service that we haven\\u2019t been seeing in top rated hotels around the world. It is great that the inter continental Le Grand preserves this level of quality in everything, staff hospitality, room cleanliness, assistance, food service, etc. Their level of quality is un- matched.\",\n          \"We went to this hotel just this month\\nWe have 3 Junior suites.\\nThe hotel is very beautiful with a very excellent location\\n   The staff at reception are good and nice.. the cleaning ladies are excellent... I really enjoyed my stay until I decided to try the breakfast!!\\n   Oh my God it ruined my entire stay!!  With this lady who bears the name (K), when she saw us two women offered us the first table in the entrance, I asked her if there was another table in the balcony, she started screaming I don't have a look, I don't!!  I said: Can you check please as I refer to the many tables available!!  She screams no, I don't have this available for 4 people with her 4 fingers and you 2!!  I said we are 3 brother on the way!!  She said and still she screamed: You can have it!  I said why are you angry with us?  She looks at me from top to bottom and turns and leaves us without saying a word!!\\n\\n   Oh my God, I couldn't yell at her because I wouldn't get down to that level with her!!  But in fact this ruined all my stay and we are all still not getting past it!!  Since we didn't do anything, we respectfully asked for another table!\\n\\nDo you think she came back and said sorry i didn\\u2019t mean it ! No !! She keep give me that look the whole time in the breakfast !! \\n\\nI have never go back to the breakfast its really embarrassed .\\n\\nThats hotel with every thing good how they let staff like her to work there i didn\\u2019t came to have this angry face first things in the morning !!\\n\\nOther than that, the hotel is very beautiful and the location is excellent\",\n          \"We had a one night stay prior to taking the Eurostar to London. We arrived around 3 15pm and had to wait in line nearly 40 minutes. When we did get to the front desk, we were told that our room was not ready which was surprising since it was now 4pm. We went out for a snack and we\\u2019re called to say our room was ready. Our room was large and very nice with a reasonable price ( for Paris) and the location is good. This is a good spot for a first time visitor but Paris offers many smaller spots with charm and a more French atmosphere\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 0,\n        \"max\": 1,\n        \"num_unique_values\": 2,\n        \"samples\": [\n          0,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d207742-r856124006-InterContinental_Paris_Le_Grand-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d207742-r864049819-InterContinental_Paris_Le_Grand-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 2,\n        \"samples\": [\n          \"OTHER\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"82C9562F2314BE52F0CD417EC6034CE2\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"Nouf M\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"noufm716\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"InterContinental Paris - Le Grand\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 207742,\n        \"max\": 207742,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          207742\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"The InterContinental Paris Le Grand, opened during the reign of Napoleon III, is located in the very heart of the city: across the street from the Op\\u00e9ra Garnier, close to some of the best-known Parisian attractions, world-famous department stores and the wonderful Place Vend\\u00f4me. The hotel contains 470 rooms, all richly decorated in the colours of the Op\\u00e9ra, and a warmly illuminated haven of peace and serenity in the bustle of Parisian life: la Verri\\u00e8re.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.0,\n        \"min\": 4.5,\n        \"max\": 4.5,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.0,\n        \"min\": 3517.0,\n        \"max\": 3517.0,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          3517.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"['roomFeatures_air conditioning', 'roomFeatures_housekeeping', 'roomFeatures_private balcony', 'roomFeatures_room service', 'roomFeatures_minibar', 'roomFeatures_refrigerator', 'roomFeatures_flatscreen tv', 'roomFeatures_on-demand movies', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'roomTypes_family rooms', 'propertyAmenities_parking', 'propertyAmenities_free internet', 'propertyAmenities_hot tub', 'propertyAmenities_fitness center with gym / workout room', 'propertyAmenities_bar / lounge', 'propertyAmenities_babysitting', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"combined\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"title great old fashioned quality service content all i can say is we found good old fashioned five star service in this hotel this is service that we havent been seeing in top rated hotels around the world it is great that the inter continental le grand preserves this level of quality in everything staff hospitality room cleanliness assistance food service etc their level of quality is un matched\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 20
        }
      ],
      "source": [
        "sample"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "mMAJaPTdk0N9",
        "outputId": "0839d552-5e97-411a-a783-1e9c336e1615"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Execution time in seconds: 8.783824682235718\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "<ipython-input-21-8160b5948b46>:7: SettingWithCopyWarning: \n",
            "A value is trying to be set on a copy of a slice from a DataFrame.\n",
            "Try using .loc[row_indexer,col_indexer] = value instead\n",
            "\n",
            "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
            "  sample[\"embedding\"] = sample.combined.apply(lambda x: embedder.encode(x))\n"
          ]
        }
      ],
      "source": [
        "# Switch to CPU\n",
        "embedder =  embedder.to('cpu')\n",
        "\n",
        "startTime = time.time()\n",
        "\n",
        "# Create a column named 'embedding', where the 'combined' column is turned to embeddings by the model.\n",
        "sample[\"embedding\"] = sample.combined.apply(lambda x: embedder.encode(x))\n",
        "\n",
        "executionTime = (time.time() - startTime)\n",
        "print('Execution time in seconds: ' + str(executionTime))\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Ud5dCHYykqb9",
        "outputId": "3a45eb88-82eb-4457-e364-c1a232c3ce48"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Execution time in seconds: 1.3229236602783203\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "<ipython-input-22-c2ada10f2885>:6: SettingWithCopyWarning: \n",
            "A value is trying to be set on a copy of a slice from a DataFrame.\n",
            "Try using .loc[row_indexer,col_indexer] = value instead\n",
            "\n",
            "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
            "  sample[\"embedding\"] = sample.combined.apply(lambda x: embedder.encode(x))\n"
          ]
        }
      ],
      "source": [
        "# Switch once more to GPU.\n",
        "\n",
        "embedder =  embedder.to('cuda')\n",
        "startTime = time.time()\n",
        "\n",
        "sample[\"embedding\"] = sample.combined.apply(lambda x: embedder.encode(x))\n",
        "\n",
        "executionTime = (time.time() - startTime)\n",
        "print('Execution time in seconds: ' + str(executionTime))\n",
        "\n",
        "# Notice the difference in time to do this operation between GPU and CPU.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 921
        },
        "id": "NJDRj1zoO_Cv",
        "outputId": "bf1612c6-4481-4b9e-a6c2-2a48c5153d36"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "5  862073785  2022-09-26              4   \n",
              "6  861021031  2022-09-20              5   \n",
              "7  860421664  2022-09-16              5   \n",
              "8  856124006  2022-08-24              5   \n",
              "9  856016947  2022-08-23              5   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "5         Not quite up to Intercontinental standards   \n",
              "6                    Luxury in the heart of the city   \n",
              "7                                          Beautiful   \n",
              "8                Great old fashioned quality service   \n",
              "9          Best location and platform to visit Paris   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "5  We had a one night stay prior to taking the Eu...      0   \n",
              "6  We were very impressed with the intercontinent...      0   \n",
              "7  Visited for my birthday and everything was jus...      0   \n",
              "8  All I can say is we found good old fashioned f...      1   \n",
              "9  Our family of 4 plus a friend enjoyed the grea...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "5  /ShowUserReviews-g187147-d207742-r862073785-In...       en   MOBILE   \n",
              "6  /ShowUserReviews-g187147-d207742-r861021031-In...       en    OTHER   \n",
              "7  /ShowUserReviews-g187147-d207742-r860421664-In...       en    OTHER   \n",
              "8  /ShowUserReviews-g187147-d207742-r856124006-In...       en    OTHER   \n",
              "9  /ShowUserReviews-g187147-d207742-r856016947-In...       en   MOBILE   \n",
              "\n",
              "                          author_id    author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941         Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7      QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B        aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8     jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912        VikaasK         VikaasK   \n",
              "5  BA9F96090F35C7A562E550825BAB4B32  badgerken2019   badgerken2019   \n",
              "6  CB65D8DF04EEB78702BB03F39BAC6717      BadBenito       BadBenito   \n",
              "7  9D8328D86D62AFA560367B6F81565010    Shivers2612     Shivers2612   \n",
              "8  82C9562F2314BE52F0CD417EC6034CE2         Nouf M        noufm716   \n",
              "9  266247D26801AA5B479974849CAA8210       JanKritz        JanKritz   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "5  InterContinental Paris - Le Grand  207742   \n",
              "6  InterContinental Paris - Le Grand  207742   \n",
              "7  InterContinental Paris - Le Grand  207742   \n",
              "8  InterContinental Paris - Le Grand  207742   \n",
              "9  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "5  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "6  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "7  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "8  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "9  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \\\n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "5  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "6  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "7  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "8  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "9  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "\n",
              "                                            combined  \\\n",
              "0  title a large impersonal place with an on time...   \n",
              "1  title good hotel with rude waiter content we w...   \n",
              "2  title fantastic content absolutely topnotch ro...   \n",
              "3  title amidst the chaos of fashion week their s...   \n",
              "4  title not worth the effort or money content th...   \n",
              "5  title not quite up to intercontinental standar...   \n",
              "6  title luxury in the heart of the city content ...   \n",
              "7  title beautiful content visited for my birthda...   \n",
              "8  title great old fashioned quality service cont...   \n",
              "9  title best location and platform to visit pari...   \n",
              "\n",
              "                                           embedding  \n",
              "0  [0.043491535, -0.01282531, 0.0029111477, 0.070...  \n",
              "1  [0.05525053, 0.019289287, -0.0056739757, 0.057...  \n",
              "2  [-0.014940896, 0.022968661, -0.0036183984, 0.0...  \n",
              "3  [-0.0036499605, 0.04220707, -0.006234068, 0.06...  \n",
              "4  [0.0013607198, -0.0038351824, 0.0018077933, 0....  \n",
              "5  [0.041726097, 0.033815235, 0.0017297651, 0.065...  \n",
              "6  [-0.0469322, -0.017643088, 0.024403226, 0.0763...  \n",
              "7  [0.007762895, 0.033725765, 0.006036935, 0.0588...  \n",
              "8  [0.026673278, -0.00047402183, 0.030833986, 0.0...  \n",
              "9  [-0.043222655, -0.009725487, 0.0045521534, 0.0...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-87bd2bea-e631-4522-9476-2cd2e69cb389\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "      <th>embedding</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title a large impersonal place with an on time...</td>\n",
              "      <td>[0.043491535, -0.01282531, 0.0029111477, 0.070...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title good hotel with rude waiter content we w...</td>\n",
              "      <td>[0.05525053, 0.019289287, -0.0056739757, 0.057...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title fantastic content absolutely topnotch ro...</td>\n",
              "      <td>[-0.014940896, 0.022968661, -0.0036183984, 0.0...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title amidst the chaos of fashion week their s...</td>\n",
              "      <td>[-0.0036499605, 0.04220707, -0.006234068, 0.06...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not worth the effort or money content th...</td>\n",
              "      <td>[0.0013607198, -0.0038351824, 0.0018077933, 0....</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>862073785</td>\n",
              "      <td>2022-09-26</td>\n",
              "      <td>4</td>\n",
              "      <td>Not quite up to Intercontinental standards</td>\n",
              "      <td>We had a one night stay prior to taking the Eu...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r862073785-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>BA9F96090F35C7A562E550825BAB4B32</td>\n",
              "      <td>badgerken2019</td>\n",
              "      <td>badgerken2019</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not quite up to intercontinental standar...</td>\n",
              "      <td>[0.041726097, 0.033815235, 0.0017297651, 0.065...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>861021031</td>\n",
              "      <td>2022-09-20</td>\n",
              "      <td>5</td>\n",
              "      <td>Luxury in the heart of the city</td>\n",
              "      <td>We were very impressed with the intercontinent...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r861021031-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>CB65D8DF04EEB78702BB03F39BAC6717</td>\n",
              "      <td>BadBenito</td>\n",
              "      <td>BadBenito</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title luxury in the heart of the city content ...</td>\n",
              "      <td>[-0.0469322, -0.017643088, 0.024403226, 0.0763...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>860421664</td>\n",
              "      <td>2022-09-16</td>\n",
              "      <td>5</td>\n",
              "      <td>Beautiful</td>\n",
              "      <td>Visited for my birthday and everything was jus...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r860421664-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>9D8328D86D62AFA560367B6F81565010</td>\n",
              "      <td>Shivers2612</td>\n",
              "      <td>Shivers2612</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title beautiful content visited for my birthda...</td>\n",
              "      <td>[0.007762895, 0.033725765, 0.006036935, 0.0588...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>856124006</td>\n",
              "      <td>2022-08-24</td>\n",
              "      <td>5</td>\n",
              "      <td>Great old fashioned quality service</td>\n",
              "      <td>All I can say is we found good old fashioned f...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r856124006-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>82C9562F2314BE52F0CD417EC6034CE2</td>\n",
              "      <td>Nouf M</td>\n",
              "      <td>noufm716</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title great old fashioned quality service cont...</td>\n",
              "      <td>[0.026673278, -0.00047402183, 0.030833986, 0.0...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>856016947</td>\n",
              "      <td>2022-08-23</td>\n",
              "      <td>5</td>\n",
              "      <td>Best location and platform to visit Paris</td>\n",
              "      <td>Our family of 4 plus a friend enjoyed the grea...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r856016947-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>266247D26801AA5B479974849CAA8210</td>\n",
              "      <td>JanKritz</td>\n",
              "      <td>JanKritz</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title best location and platform to visit pari...</td>\n",
              "      <td>[-0.043222655, -0.009725487, 0.0045521534, 0.0...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-87bd2bea-e631-4522-9476-2cd2e69cb389')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-87bd2bea-e631-4522-9476-2cd2e69cb389 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-87bd2bea-e631-4522-9476-2cd2e69cb389');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-fedd63a5-c50a-4cdf-946a-463864679a70\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-fedd63a5-c50a-4cdf-946a-463864679a70')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-fedd63a5-c50a-4cdf-946a-463864679a70 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "  <div id=\"id_cba09974-cd19-45f9-9d37-a8f794728b34\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('sample')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_cba09974-cd19-45f9-9d37-a8f794728b34 button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('sample');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "sample",
              "summary": "{\n  \"name\": \"sample\",\n  \"rows\": 10,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3175909,\n        \"min\": 856016947,\n        \"max\": 864290614,\n        \"num_unique_values\": 10,\n        \"samples\": [\n          856124006,\n          864049819,\n          862073785\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 9,\n        \"samples\": [\n          \"2022-08-24\",\n          \"2022-10-10\",\n          \"2022-09-20\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 4,\n        \"samples\": [\n          4,\n          2,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"Great old fashioned quality service\",\n          \"Good hotel with rude waiter\",\n          \"Not quite up to Intercontinental standards\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"All I can say is we found good old fashioned five star service in this hotel. This is service that we haven\\u2019t been seeing in top rated hotels around the world. It is great that the inter continental Le Grand preserves this level of quality in everything, staff hospitality, room cleanliness, assistance, food service, etc. Their level of quality is un- matched.\",\n          \"We went to this hotel just this month\\nWe have 3 Junior suites.\\nThe hotel is very beautiful with a very excellent location\\n   The staff at reception are good and nice.. the cleaning ladies are excellent... I really enjoyed my stay until I decided to try the breakfast!!\\n   Oh my God it ruined my entire stay!!  With this lady who bears the name (K), when she saw us two women offered us the first table in the entrance, I asked her if there was another table in the balcony, she started screaming I don't have a look, I don't!!  I said: Can you check please as I refer to the many tables available!!  She screams no, I don't have this available for 4 people with her 4 fingers and you 2!!  I said we are 3 brother on the way!!  She said and still she screamed: You can have it!  I said why are you angry with us?  She looks at me from top to bottom and turns and leaves us without saying a word!!\\n\\n   Oh my God, I couldn't yell at her because I wouldn't get down to that level with her!!  But in fact this ruined all my stay and we are all still not getting past it!!  Since we didn't do anything, we respectfully asked for another table!\\n\\nDo you think she came back and said sorry i didn\\u2019t mean it ! No !! She keep give me that look the whole time in the breakfast !! \\n\\nI have never go back to the breakfast its really embarrassed .\\n\\nThats hotel with every thing good how they let staff like her to work there i didn\\u2019t came to have this angry face first things in the morning !!\\n\\nOther than that, the hotel is very beautiful and the location is excellent\",\n          \"We had a one night stay prior to taking the Eurostar to London. We arrived around 3 15pm and had to wait in line nearly 40 minutes. When we did get to the front desk, we were told that our room was not ready which was surprising since it was now 4pm. We went out for a snack and we\\u2019re called to say our room was ready. Our room was large and very nice with a reasonable price ( for Paris) and the location is good. This is a good spot for a first time visitor but Paris offers many smaller spots with charm and a more French atmosphere\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 0,\n        \"max\": 1,\n        \"num_unique_values\": 2,\n        \"samples\": [\n          0,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d207742-r856124006-InterContinental_Paris_Le_Grand-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d207742-r864049819-InterContinental_Paris_Le_Grand-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 2,\n        \"samples\": [\n          \"OTHER\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"82C9562F2314BE52F0CD417EC6034CE2\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"Nouf M\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"noufm716\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"InterContinental Paris - Le Grand\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 207742,\n        \"max\": 207742,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          207742\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"The InterContinental Paris Le Grand, opened during the reign of Napoleon III, is located in the very heart of the city: across the street from the Op\\u00e9ra Garnier, close to some of the best-known Parisian attractions, world-famous department stores and the wonderful Place Vend\\u00f4me. The hotel contains 470 rooms, all richly decorated in the colours of the Op\\u00e9ra, and a warmly illuminated haven of peace and serenity in the bustle of Parisian life: la Verri\\u00e8re.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.0,\n        \"min\": 4.5,\n        \"max\": 4.5,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.0,\n        \"min\": 3517.0,\n        \"max\": 3517.0,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          3517.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"['roomFeatures_air conditioning', 'roomFeatures_housekeeping', 'roomFeatures_private balcony', 'roomFeatures_room service', 'roomFeatures_minibar', 'roomFeatures_refrigerator', 'roomFeatures_flatscreen tv', 'roomFeatures_on-demand movies', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'roomTypes_family rooms', 'propertyAmenities_parking', 'propertyAmenities_free internet', 'propertyAmenities_hot tub', 'propertyAmenities_fitness center with gym / workout room', 'propertyAmenities_bar / lounge', 'propertyAmenities_babysitting', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"combined\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"title great old fashioned quality service content all i can say is we found good old fashioned five star service in this hotel this is service that we havent been seeing in top rated hotels around the world it is great that the inter continental le grand preserves this level of quality in everything staff hospitality room cleanliness assistance food service etc their level of quality is un matched\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"embedding\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 23
        }
      ],
      "source": [
        "sample"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "tklzx-_LAYKC"
      },
      "outputs": [],
      "source": [
        "# from google.colab import drive\n",
        "# drive.mount('/gdrive')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "26sft5QNzAFT"
      },
      "outputs": [],
      "source": [
        "# Transform your dataframe to a pickle file, which is a byte stream file used to save a dataframe's state across sections.\n",
        "sample.to_pickle('/content/drive/MyDrive/Semantic_Search/df.pkl')    #to save the dataframe, df to 123.pkl"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "zUXG9behA14P"
      },
      "outputs": [],
      "source": [
        "# Load the pickle file.\n",
        "df_with_embedding = pd.read_pickle('/content/drive/MyDrive/Semantic_Search/df.pkl') #to load 123.pkl back to the dataframe df"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 643
        },
        "id": "3_b_5SG_1ggT",
        "outputId": "e41dd612-7edd-4336-9f55-00243bbc6d03"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.google.colaboratory.intrinsic+json": {
              "summary": "{\n  \"name\": \"df_with_embedding\",\n  \"rows\": 10,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3175909,\n        \"min\": 856016947,\n        \"max\": 864290614,\n        \"num_unique_values\": 10,\n        \"samples\": [\n          856124006,\n          864049819,\n          862073785\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 9,\n        \"samples\": [\n          \"2022-08-24\",\n          \"2022-10-10\",\n          \"2022-09-20\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 4,\n        \"samples\": [\n          4,\n          2,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"Great old fashioned quality service\",\n          \"Good hotel with rude waiter\",\n          \"Not quite up to Intercontinental standards\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"All I can say is we found good old fashioned five star service in this hotel. This is service that we haven\\u2019t been seeing in top rated hotels around the world. It is great that the inter continental Le Grand preserves this level of quality in everything, staff hospitality, room cleanliness, assistance, food service, etc. Their level of quality is un- matched.\",\n          \"We went to this hotel just this month\\nWe have 3 Junior suites.\\nThe hotel is very beautiful with a very excellent location\\n   The staff at reception are good and nice.. the cleaning ladies are excellent... I really enjoyed my stay until I decided to try the breakfast!!\\n   Oh my God it ruined my entire stay!!  With this lady who bears the name (K), when she saw us two women offered us the first table in the entrance, I asked her if there was another table in the balcony, she started screaming I don't have a look, I don't!!  I said: Can you check please as I refer to the many tables available!!  She screams no, I don't have this available for 4 people with her 4 fingers and you 2!!  I said we are 3 brother on the way!!  She said and still she screamed: You can have it!  I said why are you angry with us?  She looks at me from top to bottom and turns and leaves us without saying a word!!\\n\\n   Oh my God, I couldn't yell at her because I wouldn't get down to that level with her!!  But in fact this ruined all my stay and we are all still not getting past it!!  Since we didn't do anything, we respectfully asked for another table!\\n\\nDo you think she came back and said sorry i didn\\u2019t mean it ! No !! She keep give me that look the whole time in the breakfast !! \\n\\nI have never go back to the breakfast its really embarrassed .\\n\\nThats hotel with every thing good how they let staff like her to work there i didn\\u2019t came to have this angry face first things in the morning !!\\n\\nOther than that, the hotel is very beautiful and the location is excellent\",\n          \"We had a one night stay prior to taking the Eurostar to London. We arrived around 3 15pm and had to wait in line nearly 40 minutes. When we did get to the front desk, we were told that our room was not ready which was surprising since it was now 4pm. We went out for a snack and we\\u2019re called to say our room was ready. Our room was large and very nice with a reasonable price ( for Paris) and the location is good. This is a good spot for a first time visitor but Paris offers many smaller spots with charm and a more French atmosphere\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 0,\n        \"max\": 1,\n        \"num_unique_values\": 2,\n        \"samples\": [\n          0,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d207742-r856124006-InterContinental_Paris_Le_Grand-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d207742-r864049819-InterContinental_Paris_Le_Grand-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 2,\n        \"samples\": [\n          \"OTHER\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"82C9562F2314BE52F0CD417EC6034CE2\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"Nouf M\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"noufm716\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"InterContinental Paris - Le Grand\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 207742,\n        \"max\": 207742,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          207742\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"The InterContinental Paris Le Grand, opened during the reign of Napoleon III, is located in the very heart of the city: across the street from the Op\\u00e9ra Garnier, close to some of the best-known Parisian attractions, world-famous department stores and the wonderful Place Vend\\u00f4me. The hotel contains 470 rooms, all richly decorated in the colours of the Op\\u00e9ra, and a warmly illuminated haven of peace and serenity in the bustle of Parisian life: la Verri\\u00e8re.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.0,\n        \"min\": 4.5,\n        \"max\": 4.5,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.0,\n        \"min\": 3517.0,\n        \"max\": 3517.0,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          3517.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"['roomFeatures_air conditioning', 'roomFeatures_housekeeping', 'roomFeatures_private balcony', 'roomFeatures_room service', 'roomFeatures_minibar', 'roomFeatures_refrigerator', 'roomFeatures_flatscreen tv', 'roomFeatures_on-demand movies', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'roomTypes_family rooms', 'propertyAmenities_parking', 'propertyAmenities_free internet', 'propertyAmenities_hot tub', 'propertyAmenities_fitness center with gym / workout room', 'propertyAmenities_bar / lounge', 'propertyAmenities_babysitting', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"combined\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10,\n        \"samples\": [\n          \"title great old fashioned quality service content all i can say is we found good old fashioned five star service in this hotel this is service that we havent been seeing in top rated hotels around the world it is great that the inter continental le grand preserves this level of quality in everything staff hospitality room cleanliness assistance food service etc their level of quality is un matched\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"embedding\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}",
              "type": "dataframe",
              "variable_name": "df_with_embedding"
            },
            "text/html": [
              "\n",
              "  <div id=\"df-63a8c973-ed42-4d3c-90e5-29e37ebe2a38\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "      <th>embedding</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title a large impersonal place with an on time...</td>\n",
              "      <td>[0.043491535, -0.01282531, 0.0029111477, 0.070...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title good hotel with rude waiter content we w...</td>\n",
              "      <td>[0.05525053, 0.019289287, -0.0056739757, 0.057...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title fantastic content absolutely topnotch ro...</td>\n",
              "      <td>[-0.014940896, 0.022968661, -0.0036183984, 0.0...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title amidst the chaos of fashion week their s...</td>\n",
              "      <td>[-0.0036499605, 0.04220707, -0.006234068, 0.06...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not worth the effort or money content th...</td>\n",
              "      <td>[0.0013607198, -0.0038351824, 0.0018077933, 0....</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-63a8c973-ed42-4d3c-90e5-29e37ebe2a38')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-63a8c973-ed42-4d3c-90e5-29e37ebe2a38 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-63a8c973-ed42-4d3c-90e5-29e37ebe2a38');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-00e606b9-f46f-402b-b1d3-519fc4cca969\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-00e606b9-f46f-402b-b1d3-519fc4cca969')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-00e606b9-f46f-402b-b1d3-519fc4cca969 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "\n",
              "                          author_id author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941      Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7   QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B     aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8  jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912     VikaasK         VikaasK   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \\\n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "\n",
              "                                            combined  \\\n",
              "0  title a large impersonal place with an on time...   \n",
              "1  title good hotel with rude waiter content we w...   \n",
              "2  title fantastic content absolutely topnotch ro...   \n",
              "3  title amidst the chaos of fashion week their s...   \n",
              "4  title not worth the effort or money content th...   \n",
              "\n",
              "                                           embedding  \n",
              "0  [0.043491535, -0.01282531, 0.0029111477, 0.070...  \n",
              "1  [0.05525053, 0.019289287, -0.0056739757, 0.057...  \n",
              "2  [-0.014940896, 0.022968661, -0.0036183984, 0.0...  \n",
              "3  [-0.0036499605, 0.04220707, -0.006234068, 0.06...  \n",
              "4  [0.0013607198, -0.0038351824, 0.0018077933, 0....  "
            ]
          },
          "execution_count": 30,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_with_embedding.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 49,
          "referenced_widgets": [
            "7a02bbcceda94bc0a55e5d8e61c4b196",
            "0600ca30b26840c284b8b7f7e9b17537",
            "29722c68d46741899e9172bb9b83cb5c",
            "035978731c9c43c792fcb98245b9d6b4",
            "0d00ee08c9ca4dc2913bdaf5e23a1d1b",
            "ce50402307ce4c9381ef46ba967c633a",
            "8c67887b415243a5bdc936185129d754",
            "c58441daa1f44b38bb60df207fc910c3",
            "24394d5265a747159f7876e9e935b80e",
            "106a9909364b4a9c8d7edc94caa39989",
            "21ef620d80604b4a8fbd0043d253eda3"
          ]
        },
        "id": "lZWcMc1dzkvr",
        "outputId": "4a5a0b92-7fde-408b-819d-b1743f23d6fa"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "7a02bbcceda94bc0a55e5d8e61c4b196",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "Batches:   0%|          | 0/1 [00:00<?, ?it/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "query = 'Not worth the effort or money + This hotel is not worth the effort or the price'\n",
        "\n",
        "# Embed the previous query.\n",
        "query_embedding = embedder.encode(query,show_progress_bar=True)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 143
        },
        "id": "0z3H8o_4CJ63",
        "outputId": "e2ec78b2-17e0-4da9-b84a-014d7835d35a"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "string"
            },
            "text/plain": [
              "'title a large impersonal place with an on time check in problem and other issues content if you are looking for a huge grand hotel experience this place may be for you but i found it to be impersonal and the staff lacking warmth and sometimes manners they seem to avoid engagement with guests whenever possible add that to the fact that each morning and evening there are 2 or 3 bus loads of tour groups gathering in the lobby and right outside the hotel when i encountered this on my first evening and needed a taxi i asked the doorman whether he could get me a taxi or whether i should order an uber he simply nodded and walked away so i ordered an uber\\n\\nthe checkin counter must be understaffed as i had to wait in a long line for about 15 minutes only to be told that my room was not ready official checkin is 2pm but my room was not ready until 5pm i should have taken seriously the many previous tripadvisor reviewers who had the same experience they gave me a drink voucher in the bar as compensation but i didnt use it because i wasnt in the mood for a drink after international travel or any other day because im not a bar person and the checkin person said he would phone me when my room was ready but never did i only found out it was ready after checking\\n\\nthe breakfast buffet is fine but nothing special and over my 3 days there several times i bumped into servers who cut me off or crossed in front of me as i navigated to and from the buffet i had dinner in the restaurant straight from a long day of exploring and apparently didnt meet the maitre ds standards as he tried everything in his power to avoid seating me in the mostly empty restaurant at 615pm finally he phoned the front desk to verify that i was a hotel guest and ran out of excuses after all that trouble i found the menu limited the food mediocre and the service bordering on surly\\n\\nmy suite was large and nice although there was very low water pressure in the shower and oddly despite mirrors everywhere not one was full length also all of the glasses and coffee mugs in the minibar were dirty\\n\\nso one star for the decent room and for the two people working there who were genuinely nice to me during my 3 days there'"
            ]
          },
          "execution_count": 32,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "# First element of the 'combined' column.\n",
        "df_with_embedding.combined[0]"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 49,
          "referenced_widgets": [
            "2f8c8d5f25e24a32b53ac0cdd85c7e30",
            "2eab1853534d408996a384ddc83cb5d6",
            "51a4f03b642e4950b10fa4cec6c1bc44",
            "3d367015f20c4d449062656e297348d8",
            "648fe24f29a64423b373cc663c267388",
            "35d69789141e46e58f30279a5994471a",
            "7b0394e29ec740e496d38bca3e304b12",
            "9711144e69f548b087451cbc717aabc5",
            "6cf036ff8eb043b2b3dd2e4edd51167d",
            "1977653e40a14c6b916335eac0edf3b2",
            "8267a2370fcf40b0830a171e5eb5c3ab"
          ]
        },
        "id": "ApOEsleDl1Rp",
        "outputId": "e074c91f-cbf0-4794-baf5-73747be2f29e"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.jupyter.widget-view+json": {
              "model_id": "2f8c8d5f25e24a32b53ac0cdd85c7e30",
              "version_major": 2,
              "version_minor": 0
            },
            "text/plain": [
              "Batches:   0%|          | 0/1 [00:00<?, ?it/s]"
            ]
          },
          "metadata": {},
          "output_type": "display_data"
        }
      ],
      "source": [
        "# Create a list of embeddings, from the contents of the \"combined\" column.\n",
        "corpus_embeddings = embedder.encode(df_with_embedding.combined,show_progress_bar=True)\n",
        "\n",
        "# Create a column called 'similarity', displaying the cosine similarity between your embedded query and each embedded content from the 'corpus_embeddings' variable.\n",
        "df_with_embedding['similarity']=cosine_similarity(corpus_embeddings, query_embedding)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 950
        },
        "id": "ju_tyeYrmPq5",
        "outputId": "e9daefa8-b722-48eb-fd85-beacbba4de66"
      },
      "outputs": [
        {
          "data": {
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df_with_embedding"
            },
            "text/html": [
              "\n",
              "  <div id=\"df-f2b02cfe-453f-46c4-944b-153909f5bbe7\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>...</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "      <th>embedding</th>\n",
              "      <th>similarity</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>...</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title a large impersonal place with an on time...</td>\n",
              "      <td>[0.043491535, -0.01282531, 0.0029111477, 0.070...</td>\n",
              "      <td>0.180471</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>...</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title good hotel with rude waiter content we w...</td>\n",
              "      <td>[0.05525053, 0.019289287, -0.0056739757, 0.057...</td>\n",
              "      <td>0.144596</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>...</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title fantastic content absolutely topnotch ro...</td>\n",
              "      <td>[-0.014940896, 0.022968661, -0.0036183984, 0.0...</td>\n",
              "      <td>0.154253</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>...</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title amidst the chaos of fashion week their s...</td>\n",
              "      <td>[-0.0036499605, 0.04220707, -0.006234068, 0.06...</td>\n",
              "      <td>0.151105</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>...</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not worth the effort or money content th...</td>\n",
              "      <td>[0.0013607198, -0.0038351824, 0.0018077933, 0....</td>\n",
              "      <td>0.255166</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>862073785</td>\n",
              "      <td>2022-09-26</td>\n",
              "      <td>4</td>\n",
              "      <td>Not quite up to Intercontinental standards</td>\n",
              "      <td>We had a one night stay prior to taking the Eu...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r862073785-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>BA9F96090F35C7A562E550825BAB4B32</td>\n",
              "      <td>...</td>\n",
              "      <td>badgerken2019</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not quite up to intercontinental standar...</td>\n",
              "      <td>[0.041726097, 0.033815235, 0.0017297651, 0.065...</td>\n",
              "      <td>0.151502</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>861021031</td>\n",
              "      <td>2022-09-20</td>\n",
              "      <td>5</td>\n",
              "      <td>Luxury in the heart of the city</td>\n",
              "      <td>We were very impressed with the intercontinent...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r861021031-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>CB65D8DF04EEB78702BB03F39BAC6717</td>\n",
              "      <td>...</td>\n",
              "      <td>BadBenito</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title luxury in the heart of the city content ...</td>\n",
              "      <td>[-0.0469322, -0.017643088, 0.024403226, 0.0763...</td>\n",
              "      <td>0.105180</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>860421664</td>\n",
              "      <td>2022-09-16</td>\n",
              "      <td>5</td>\n",
              "      <td>Beautiful</td>\n",
              "      <td>Visited for my birthday and everything was jus...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r860421664-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>9D8328D86D62AFA560367B6F81565010</td>\n",
              "      <td>...</td>\n",
              "      <td>Shivers2612</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title beautiful content visited for my birthda...</td>\n",
              "      <td>[0.007762895, 0.033725765, 0.006036935, 0.0588...</td>\n",
              "      <td>0.146341</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>856124006</td>\n",
              "      <td>2022-08-24</td>\n",
              "      <td>5</td>\n",
              "      <td>Great old fashioned quality service</td>\n",
              "      <td>All I can say is we found good old fashioned f...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r856124006-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>82C9562F2314BE52F0CD417EC6034CE2</td>\n",
              "      <td>...</td>\n",
              "      <td>noufm716</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title great old fashioned quality service cont...</td>\n",
              "      <td>[0.026673278, -0.00047402183, 0.030833986, 0.0...</td>\n",
              "      <td>0.136536</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>856016947</td>\n",
              "      <td>2022-08-23</td>\n",
              "      <td>5</td>\n",
              "      <td>Best location and platform to visit Paris</td>\n",
              "      <td>Our family of 4 plus a friend enjoyed the grea...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r856016947-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>266247D26801AA5B479974849CAA8210</td>\n",
              "      <td>...</td>\n",
              "      <td>JanKritz</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title best location and platform to visit pari...</td>\n",
              "      <td>[-0.043222655, -0.009725487, 0.0045521534, 0.0...</td>\n",
              "      <td>0.135314</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>10 rows × 21 columns</p>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-f2b02cfe-453f-46c4-944b-153909f5bbe7')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-f2b02cfe-453f-46c4-944b-153909f5bbe7 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-f2b02cfe-453f-46c4-944b-153909f5bbe7');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-8ee4129d-05c6-498c-8fc2-13d32b116e19\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-8ee4129d-05c6-498c-8fc2-13d32b116e19')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-8ee4129d-05c6-498c-8fc2-13d32b116e19 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "  <div id=\"id_2767dd40-5efe-490b-a140-62d9dd605101\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df_with_embedding')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_2767dd40-5efe-490b-a140-62d9dd605101 button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('df_with_embedding');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "5  862073785  2022-09-26              4   \n",
              "6  861021031  2022-09-20              5   \n",
              "7  860421664  2022-09-16              5   \n",
              "8  856124006  2022-08-24              5   \n",
              "9  856016947  2022-08-23              5   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "5         Not quite up to Intercontinental standards   \n",
              "6                    Luxury in the heart of the city   \n",
              "7                                          Beautiful   \n",
              "8                Great old fashioned quality service   \n",
              "9          Best location and platform to visit Paris   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "5  We had a one night stay prior to taking the Eu...      0   \n",
              "6  We were very impressed with the intercontinent...      0   \n",
              "7  Visited for my birthday and everything was jus...      0   \n",
              "8  All I can say is we found good old fashioned f...      1   \n",
              "9  Our family of 4 plus a friend enjoyed the grea...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "5  /ShowUserReviews-g187147-d207742-r862073785-In...       en   MOBILE   \n",
              "6  /ShowUserReviews-g187147-d207742-r861021031-In...       en    OTHER   \n",
              "7  /ShowUserReviews-g187147-d207742-r860421664-In...       en    OTHER   \n",
              "8  /ShowUserReviews-g187147-d207742-r856124006-In...       en    OTHER   \n",
              "9  /ShowUserReviews-g187147-d207742-r856016947-In...       en   MOBILE   \n",
              "\n",
              "                          author_id  ... author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941  ...        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7  ...       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B  ...         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8  ...      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912  ...         VikaasK   \n",
              "5  BA9F96090F35C7A562E550825BAB4B32  ...   badgerken2019   \n",
              "6  CB65D8DF04EEB78702BB03F39BAC6717  ...       BadBenito   \n",
              "7  9D8328D86D62AFA560367B6F81565010  ...     Shivers2612   \n",
              "8  82C9562F2314BE52F0CD417EC6034CE2  ...        noufm716   \n",
              "9  266247D26801AA5B479974849CAA8210  ...        JanKritz   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "5  InterContinental Paris - Le Grand  207742   \n",
              "6  InterContinental Paris - Le Grand  207742   \n",
              "7  InterContinental Paris - Le Grand  207742   \n",
              "8  InterContinental Paris - Le Grand  207742   \n",
              "9  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "5  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "6  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "7  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "8  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "9  The InterContinental Paris Le Grand, opened du...    4.5        3517.0   \n",
              "\n",
              "                                            features  \\\n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "5  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "6  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "7  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "8  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "9  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "\n",
              "                                            combined  \\\n",
              "0  title a large impersonal place with an on time...   \n",
              "1  title good hotel with rude waiter content we w...   \n",
              "2  title fantastic content absolutely topnotch ro...   \n",
              "3  title amidst the chaos of fashion week their s...   \n",
              "4  title not worth the effort or money content th...   \n",
              "5  title not quite up to intercontinental standar...   \n",
              "6  title luxury in the heart of the city content ...   \n",
              "7  title beautiful content visited for my birthda...   \n",
              "8  title great old fashioned quality service cont...   \n",
              "9  title best location and platform to visit pari...   \n",
              "\n",
              "                                           embedding similarity  \n",
              "0  [0.043491535, -0.01282531, 0.0029111477, 0.070...   0.180471  \n",
              "1  [0.05525053, 0.019289287, -0.0056739757, 0.057...   0.144596  \n",
              "2  [-0.014940896, 0.022968661, -0.0036183984, 0.0...   0.154253  \n",
              "3  [-0.0036499605, 0.04220707, -0.006234068, 0.06...   0.151105  \n",
              "4  [0.0013607198, -0.0038351824, 0.0018077933, 0....   0.255166  \n",
              "5  [0.041726097, 0.033815235, 0.0017297651, 0.065...   0.151502  \n",
              "6  [-0.0469322, -0.017643088, 0.024403226, 0.0763...   0.105180  \n",
              "7  [0.007762895, 0.033725765, 0.006036935, 0.0588...   0.146341  \n",
              "8  [0.026673278, -0.00047402183, 0.030833986, 0.0...   0.136536  \n",
              "9  [-0.043222655, -0.009725487, 0.0045521534, 0.0...   0.135314  \n",
              "\n",
              "[10 rows x 21 columns]"
            ]
          },
          "execution_count": 34,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "df_with_embedding"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "h1Vi8cEE0ZmA"
      },
      "outputs": [],
      "source": [
        "# cosine_similarity(corpus_embeddings, query_embedding)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "qFvemBkg1taW"
      },
      "source": [
        "#Entire Data"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "avax6lku2MId",
        "outputId": "7d454fec-265f-4b0c-c2e4-5bf2e4da01c9"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Execution time in seconds: 194.51187252998352\n"
          ]
        }
      ],
      "source": [
        "startTime = time.time()\n",
        "\n",
        "# Create a column named 'embedding', where the 'combined' column is turned to embeddings by the model.\n",
        "df_combined[\"embedding\"] = df_combined.combined.apply(lambda x: embedder.encode(x))\n",
        "\n",
        "executionTime = (time.time() - startTime)\n",
        "print('Execution time in seconds: ' + str(executionTime))\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "G0ygXuhU2MEk"
      },
      "outputs": [],
      "source": [
        "# Turn the dataframe you have just created to pickle file, for later use.\n",
        "df_combined.to_pickle('/content/drive/MyDrive/Semantic_Search/entire_data.pkl')"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "1wICGbJOEjpL"
      },
      "source": [
        "##Embedding upload - new starting point\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "e4Ru0BNH3Csa",
        "outputId": "6d14be99-00d4-4a14-cb34-3f68bcaaa3d3"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: openai==0.27.7 in /usr/local/lib/python3.10/dist-packages (0.27.7)\n",
            "Requirement already satisfied: requests>=2.20 in /usr/local/lib/python3.10/dist-packages (from openai==0.27.7) (2.32.3)\n",
            "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from openai==0.27.7) (4.66.5)\n",
            "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from openai==0.27.7) (3.10.9)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (3.3.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (2.2.3)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.20->openai==0.27.7) (2024.8.30)\n",
            "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (2.4.3)\n",
            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (1.3.1)\n",
            "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (24.2.0)\n",
            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (1.4.1)\n",
            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (6.1.0)\n",
            "Requirement already satisfied: yarl<2.0,>=1.12.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (1.13.1)\n",
            "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->openai==0.27.7) (4.0.3)\n",
            "Requirement already satisfied: typing-extensions>=4.1.0 in /usr/local/lib/python3.10/dist-packages (from multidict<7.0,>=4.5->aiohttp->openai==0.27.7) (4.12.2)\n",
            "Requirement already satisfied: gradio in /usr/local/lib/python3.10/dist-packages (5.0.1)\n",
            "Requirement already satisfied: aiofiles<24.0,>=22.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (23.2.1)\n",
            "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
            "Requirement already satisfied: fastapi<1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.115.0)\n",
            "Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio) (0.4.0)\n",
            "Requirement already satisfied: gradio-client==1.4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.4.0)\n",
            "Requirement already satisfied: httpx>=0.24.1 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.27.2)\n",
            "Requirement already satisfied: huggingface-hub>=0.25.1 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.25.2)\n",
            "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.4)\n",
            "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.5)\n",
            "Requirement already satisfied: numpy<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.26.4)\n",
            "Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.10.7)\n",
            "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (24.1)\n",
            "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.2.2)\n",
            "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (10.4.0)\n",
            "Requirement already satisfied: pydantic>=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.9.2)\n",
            "Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio) (0.25.1)\n",
            "Requirement already satisfied: python-multipart>=0.0.9 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.0.12)\n",
            "Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.2)\n",
            "Requirement already satisfied: ruff>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.6.9)\n",
            "Requirement already satisfied: semantic-version~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.10.0)\n",
            "Requirement already satisfied: tomlkit==0.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.0)\n",
            "Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.5)\n",
            "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.12.2)\n",
            "Requirement already satisfied: uvicorn>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.31.1)\n",
            "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.4.0->gradio) (2024.6.1)\n",
            "Requirement already satisfied: websockets<13.0,>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.4.0->gradio) (12.0)\n",
            "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (3.10)\n",
            "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
            "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.2.2)\n",
            "Requirement already satisfied: starlette<0.39.0,>=0.37.2 in /usr/local/lib/python3.10/dist-packages (from fastapi<1.0->gradio) (0.38.6)\n",
            "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (2024.8.30)\n",
            "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (1.0.6)\n",
            "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.25.1->gradio) (3.16.1)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.25.1->gradio) (2.32.3)\n",
            "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.25.1->gradio) (4.66.5)\n",
            "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.2)\n",
            "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.2)\n",
            "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (0.7.0)\n",
            "Requirement already satisfied: pydantic-core==2.23.4 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (2.23.4)\n",
            "Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (8.1.7)\n",
            "Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
            "Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (13.9.2)\n",
            "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas<3.0,>=1.0->gradio) (1.16.0)\n",
            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.18.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.25.1->gradio) (3.3.2)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.25.1->gradio) (2.2.3)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n",
            "Requirement already satisfied: sentence-transformers in /usr/local/lib/python3.10/dist-packages (3.2.0)\n",
            "Requirement already satisfied: transformers<5.0.0,>=4.41.0 in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (4.44.2)\n",
            "Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (4.66.5)\n",
            "Requirement already satisfied: torch>=1.11.0 in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (2.4.1+cu121)\n",
            "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (1.5.2)\n",
            "Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (1.13.1)\n",
            "Requirement already satisfied: huggingface-hub>=0.20.0 in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (0.25.2)\n",
            "Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from sentence-transformers) (10.4.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (3.16.1)\n",
            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2024.6.1)\n",
            "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (24.1)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (6.0.2)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (2.32.3)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.20.0->sentence-transformers) (4.12.2)\n",
            "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.11.0->sentence-transformers) (1.13.3)\n",
            "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.11.0->sentence-transformers) (3.3)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.11.0->sentence-transformers) (3.1.4)\n",
            "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (1.26.4)\n",
            "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (2024.9.11)\n",
            "Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.4.5)\n",
            "Requirement already satisfied: tokenizers<0.20,>=0.19 in /usr/local/lib/python3.10/dist-packages (from transformers<5.0.0,>=4.41.0->sentence-transformers) (0.19.1)\n",
            "Requirement already satisfied: joblib>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->sentence-transformers) (1.4.2)\n",
            "Requirement already satisfied: threadpoolctl>=3.1.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->sentence-transformers) (3.5.0)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.11.0->sentence-transformers) (2.1.5)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (3.3.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (2.2.3)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.20.0->sentence-transformers) (2024.8.30)\n",
            "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.11.0->sentence-transformers) (1.3.0)\n"
          ]
        }
      ],
      "source": [
        "!pip install openai==0.27.7\n",
        "!pip install gradio\n",
        "!pip install -U sentence-transformers"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "4mZFs58C3DIe",
        "outputId": "1f952087-c98e-4e65-b599-9fdbc09528d7"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Mounted at /content/drive\n"
          ]
        }
      ],
      "source": [
        "# drive.mount() loads the contents from your Google Drive.\n",
        "\n",
        "from google.colab import drive\n",
        "drive.mount('/content/drive')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "sPv3vsss26gs"
      },
      "outputs": [],
      "source": [
        "import json\n",
        "import pandas as pd\n",
        "import time\n",
        "import spacy\n",
        "from spacy.lang.en.stop_words import STOP_WORDS\n",
        "from string import punctuation\n",
        "from collections import Counter\n",
        "from heapq import nlargest\n",
        "import nltk\n",
        "import numpy as np\n",
        "from tqdm import tqdm\n",
        "from sentence_transformers import SentenceTransformer, util\n",
        "# import tiktoken\n",
        "from openai.embeddings_utils import get_embedding, cosine_similarity"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "vcknAKDP3bKV",
        "outputId": "b502ca59-cd87-4968-dcb3-baafa1642e21"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884\n",
            "  warnings.warn(\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "GPU Found!\n"
          ]
        }
      ],
      "source": [
        "import json\n",
        "from sentence_transformers import SentenceTransformer, CrossEncoder, util\n",
        "import gzip\n",
        "import os\n",
        "import torch\n",
        "\n",
        "embedder = SentenceTransformer('all-mpnet-base-v2')\n",
        "\n",
        "# Use the GPU if available\n",
        "if not torch.cuda.is_available():\n",
        "    print(\"Warning: No GPU found. Please add GPU to your notebook\")\n",
        "else:\n",
        "  print(\"GPU Found!\")\n",
        "  embedder =  embedder.to('cuda')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "pN_UffIcrQZj"
      },
      "outputs": [],
      "source": [
        "# Read the pickle file you entered earlier.\n",
        "import pandas as pd\n",
        "df = pd.read_pickle('/content/drive/MyDrive/Semantic_Search/entire_data.pkl') #to load 123.pkl back to the dataframe df"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "3W0v1vPmFNvU",
        "outputId": "7a66e570-38d7-4785-d3ba-12e7d307e305"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "(11990, 20)"
            ]
          },
          "metadata": {},
          "execution_count": 26
        }
      ],
      "source": [
        "df.shape"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 643
        },
        "id": "zDrGEYrrrdST",
        "outputId": "7198c901-1c25-47b7-af32-ad6b03eca893"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "   review_id        date  review_rating  \\\n",
              "0  864290614  2022-10-12              1   \n",
              "1  864049819  2022-10-10              4   \n",
              "2  863952022  2022-10-10              5   \n",
              "3  863793066  2022-10-09              4   \n",
              "4  863631994  2022-10-08              2   \n",
              "\n",
              "                                               title  \\\n",
              "0  A large impersonal place with an on time check...   \n",
              "1                        Good hotel with rude waiter   \n",
              "2                                          Fantastic   \n",
              "3  Amidst the chaos of Fashion week, their servic...   \n",
              "4                      Not worth the effort or money   \n",
              "\n",
              "                                                text  votes  \\\n",
              "0  If you are looking for a huge, grand hotel exp...      1   \n",
              "1  We went to this hotel just this month\\nWe have...      1   \n",
              "2  Absolutely top-notch. Room, service, bed, pill...      0   \n",
              "3  We stayed during the Paris Fashion Week Chaos....      0   \n",
              "4  This hotel is not worth the effort or the pric...      0   \n",
              "\n",
              "                                                 url language platform  \\\n",
              "0  /ShowUserReviews-g187147-d207742-r864290614-In...       en   MOBILE   \n",
              "1  /ShowUserReviews-g187147-d207742-r864049819-In...       en   MOBILE   \n",
              "2  /ShowUserReviews-g187147-d207742-r863952022-In...       en    OTHER   \n",
              "3  /ShowUserReviews-g187147-d207742-r863793066-In...       en   MOBILE   \n",
              "4  /ShowUserReviews-g187147-d207742-r863631994-In...       en   MOBILE   \n",
              "\n",
              "                          author_id author_name author_username  \\\n",
              "0  E488EBBA1F82F16BF878FE274C735941      Anna J        AnnaJ250   \n",
              "1  4A830AD8B128F60AC02E83D6B6A530F7   QATAR2007       QATAR2007   \n",
              "2  AA2958C3E083861E81EEC085671BAA5B     aji1376         aji1376   \n",
              "3  DE4AB96DA3E104846D6D6423C2DAA4C8  jelinc2016      jelinc2016   \n",
              "4  DE02D713F209AEC684DC6108509E6912     VikaasK         VikaasK   \n",
              "\n",
              "                                name      id  \\\n",
              "0  InterContinental Paris - Le Grand  207742   \n",
              "1  InterContinental Paris - Le Grand  207742   \n",
              "2  InterContinental Paris - Le Grand  207742   \n",
              "3  InterContinental Paris - Le Grand  207742   \n",
              "4  InterContinental Paris - Le Grand  207742   \n",
              "\n",
              "                                         description  rating  rating_count  \\\n",
              "0  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "1  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "2  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "3  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "4  The InterContinental Paris Le Grand, opened du...     4.5        3517.0   \n",
              "\n",
              "                                            features  \\\n",
              "0  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "1  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "2  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "3  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "4  ['roomFeatures_air conditioning', 'roomFeature...   \n",
              "\n",
              "                                            combined  \\\n",
              "0  title a large impersonal place with an on time...   \n",
              "1  title good hotel with rude waiter content we w...   \n",
              "2  title fantastic content absolutely topnotch ro...   \n",
              "3  title amidst the chaos of fashion week their s...   \n",
              "4  title not worth the effort or money content th...   \n",
              "\n",
              "                                           embedding  \n",
              "0  [0.043491498, -0.012825325, 0.0029111586, 0.07...  \n",
              "1  [0.06402065, 0.027982308, -0.008169623, 0.0557...  \n",
              "2  [0.02479708, 0.044157468, -0.025919398, 0.0232...  \n",
              "3  [0.028466854, 0.06191462, -0.0204664, 0.075028...  \n",
              "4  [0.024692703, 0.03586695, -0.001174005, 0.0902...  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-80b428d6-2b85-4506-bf15-ec6d571b9aa2\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>author_name</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "      <th>embedding</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>864290614</td>\n",
              "      <td>2022-10-12</td>\n",
              "      <td>1</td>\n",
              "      <td>A large impersonal place with an on time check...</td>\n",
              "      <td>If you are looking for a huge, grand hotel exp...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864290614-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>E488EBBA1F82F16BF878FE274C735941</td>\n",
              "      <td>Anna J</td>\n",
              "      <td>AnnaJ250</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title a large impersonal place with an on time...</td>\n",
              "      <td>[0.043491498, -0.012825325, 0.0029111586, 0.07...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>864049819</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>4</td>\n",
              "      <td>Good hotel with rude waiter</td>\n",
              "      <td>We went to this hotel just this month\\nWe have...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r864049819-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>4A830AD8B128F60AC02E83D6B6A530F7</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>QATAR2007</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title good hotel with rude waiter content we w...</td>\n",
              "      <td>[0.06402065, 0.027982308, -0.008169623, 0.0557...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>863952022</td>\n",
              "      <td>2022-10-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Fantastic</td>\n",
              "      <td>Absolutely top-notch. Room, service, bed, pill...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863952022-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>AA2958C3E083861E81EEC085671BAA5B</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>aji1376</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title fantastic content absolutely topnotch ro...</td>\n",
              "      <td>[0.02479708, 0.044157468, -0.025919398, 0.0232...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>863793066</td>\n",
              "      <td>2022-10-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Amidst the chaos of Fashion week, their servic...</td>\n",
              "      <td>We stayed during the Paris Fashion Week Chaos....</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863793066-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE4AB96DA3E104846D6D6423C2DAA4C8</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>jelinc2016</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title amidst the chaos of fashion week their s...</td>\n",
              "      <td>[0.028466854, 0.06191462, -0.0204664, 0.075028...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>863631994</td>\n",
              "      <td>2022-10-08</td>\n",
              "      <td>2</td>\n",
              "      <td>Not worth the effort or money</td>\n",
              "      <td>This hotel is not worth the effort or the pric...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d207742-r863631994-In...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>DE02D713F209AEC684DC6108509E6912</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>VikaasK</td>\n",
              "      <td>InterContinental Paris - Le Grand</td>\n",
              "      <td>207742</td>\n",
              "      <td>The InterContinental Paris Le Grand, opened du...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>3517.0</td>\n",
              "      <td>['roomFeatures_air conditioning', 'roomFeature...</td>\n",
              "      <td>title not worth the effort or money content th...</td>\n",
              "      <td>[0.024692703, 0.03586695, -0.001174005, 0.0902...</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-80b428d6-2b85-4506-bf15-ec6d571b9aa2')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-80b428d6-2b85-4506-bf15-ec6d571b9aa2 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-80b428d6-2b85-4506-bf15-ec6d571b9aa2');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-6f6d6088-366e-4286-b290-09faf7cfd24b\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-6f6d6088-366e-4286-b290-09faf7cfd24b')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-6f6d6088-366e-4286-b290-09faf7cfd24b button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df",
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 11990,\n  \"fields\": [\n    {\n      \"column\": \"review_id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 122256454,\n        \"min\": 164526208,\n        \"max\": 864678776,\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          669536692,\n          659579136,\n          465497336\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"date\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 2034,\n        \"samples\": [\n          \"2022-04-21\",\n          \"2021-08-02\",\n          \"2017-08-07\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"review_rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": 1,\n        \"max\": 5,\n        \"num_unique_values\": 5,\n        \"samples\": [\n          4,\n          3,\n          5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 10041,\n        \"samples\": [\n          \"Perfect for us\",\n          \"Great Location, a lot of space and great staff\",\n          \"Great Location - Great Service\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"Location was super, hotel was clean convenient and value for money paid, Very close to nice restaurants and carers as well to various means of transportation, the hotel was clean with quality bathing stuff.\",\n          \"This hotel appears to have been recently renovated.  My room, small as they all are in Paris, was very well appointed, spotless, a very good shower and all the amenities.  The staff were excellent and very helpful.  The area is perfect.  Very close to the St. Paul Metro stop and all the restaurants and shops in Place des Vosges and Rue Saint Antoine.  I've stayed in other three star hotels in the area and this one is, by far, the best.\",\n          \"The hotel is well located, it's about 800m far from Arc the triumph. Wonderful breakfast and room. There is Wi-Fi available from everywhere in the hotel. We had some problems, the shower didn't heat water in one day, the manager increased extra fee for my child (even when we informed his age, previously by email and they confirmed the prices). All other things were perfect!!!!\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"votes\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 1,\n        \"min\": -1,\n        \"max\": 40,\n        \"num_unique_values\": 15,\n        \"samples\": [\n          9,\n          -1,\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"url\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11990,\n        \"samples\": [\n          \"/ShowUserReviews-g187147-d228758-r669536692-Hotel_Plaza_Etoile-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d636096-r659579136-Hotel_Turenne_Le_Marais-Paris_Ile_de_France.html\",\n          \"/ShowUserReviews-g187147-d1790107-r465497336-Hotel_Le_46-Paris_Ile_de_France.html\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"language\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"en\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"platform\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"MOBILE\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_id\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"96D7A3BF4690A5843721CE13287A17D8\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_name\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11284,\n        \"samples\": [\n          \"tcmerge\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"author_username\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11856,\n        \"samples\": [\n          \"ameda2018\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"name\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 156,\n        \"samples\": [\n          \"Paris Marriott Champs Elysees Hotel\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"id\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 4801568,\n        \"min\": 188738,\n        \"max\": 24042238,\n        \"num_unique_values\": 156,\n        \"samples\": [\n          197935\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"description\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 67,\n        \"samples\": [\n          \"Hotel Alhambra is located in a lively district of Paris, 400 metres from Place de la R\\u00e9publique. It features design decoration, a 400 m\\u00b2 private garden and a 24-hour reception with ticket service and offers an airport shuttle.The soundproofed guest rooms are equipped with a flat-screen TV with satellite channels and free Wi-Fi access. Most rooms offer a view of the garden and each room has a private bathroom with a walk-in shower.Every morning, a buffet breakfast is served and can be enjoyed in the comfort of guest rooms or in the garden. Guests can dine on the shaded terrace set in the flowery garden. Traditional restaurants are located just 40 metres away.Popular entertainment venues, the Cirque d'Hiver and the Bataclan are just 100 metres from the hotel. Oberkampf Metro Station is just 40 metres away and provides access to Place de la Bastille. The lively Marais district is 200 metres from the hotel.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.2891668380465141,\n        \"min\": 4.0,\n        \"max\": 5.0,\n        \"num_unique_values\": 3,\n        \"samples\": [\n          4.5\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"rating_count\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 901.539832833028,\n        \"min\": 58.0,\n        \"max\": 4438.0,\n        \"num_unique_values\": 74,\n        \"samples\": [\n          450.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"features\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 76,\n        \"samples\": [\n          \"['roomFeatures_soundproof rooms', 'roomFeatures_desk', 'roomFeatures_safe', 'roomFeatures_flatscreen tv', 'roomFeatures_bath / shower', 'roomFeatures_hair dryer', 'roomTypes_bridal suite', 'roomTypes_non-smoking rooms', 'roomTypes_suites', 'propertyAmenities_free high speed internet (wifi)', 'propertyAmenities_free breakfast', 'propertyAmenities_airport transportation', 'propertyAmenities_business center with internet access', 'propertyAmenities_baggage storage', 'propertyAmenities_concierge', 'propertyAmenities_24-hour front desk', 'propertyAmenities_express check-in / check-out']\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"combined\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 11989,\n        \"samples\": [\n          \"title jeniuous hotel location content location was super hotel was clean convenient and value for money paid very close to nice restaurants and carers as well to various means of transportation the hotel was clean with quality bathing stuff desc location was super hotel was clean convenient and value for money paid very close to nice restaurants and carers as well to various means of transportation the hotel was clean with quality bathing stuff\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"embedding\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 27
        }
      ],
      "source": [
        "df.head()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "evYheRL02L4q"
      },
      "outputs": [],
      "source": [
        "# search through the reviews for a specific product\n",
        "def search_reviews(df, query, n=5, pprint=True):\n",
        "\n",
        "    # Embed your search query.\n",
        "    query_embedding = embedder.encode(query,show_progress_bar=True)\n",
        "\n",
        "    # As before, create a 'similarity' column, which shows the cosine similarity between the your query and the embedded combined contents.\n",
        "    # REMEMBER!! YOU ARE USING THE SAME MODEL TO EMBED BOTH THE COMBINED CONTENTS AND YOUR QUERY.\n",
        "    df[\"similarity\"] = df.embedding.apply(lambda x: cosine_similarity(x, query_embedding.reshape(768,-1))) #similarity against each doc\n",
        "\n",
        "    # Now, sort the values bty similarity, and choose the most similar doc.\n",
        "    results = (\n",
        "        df.sort_values(\"similarity\", ascending=False) # re-rank\n",
        "        .head(n))\n",
        "\n",
        "    return results"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "UyfurmO54Fq-"
      },
      "outputs": [],
      "source": [
        "query = 'hotel close to Louvre and great food nearby but not too expensive'"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 49,
          "referenced_widgets": [
            "55035bf31852417c859a735472f6f395",
            "f56c696983084767ad93444df3d129b6",
            "a1f1f4156018465db76b59a07378b897",
            "c1758a8cd20043efa040a415c1a64c9b",
            "f40edd730dfd40b3800fa4cd1b0a231d",
            "b727e58524bb4f7082d669d544e38bff",
            "1d6fde2af3744140b4a092fc4f548a10",
            "2c3547fc527a4983b2e9714bbed98519",
            "21529d7f705e46d48137268fc2425a38",
            "a5cd4c5aaee546cbaddaa6f3db89f70c",
            "bf0d90fe23534f21a1cc0e635bd1d2b2"
          ]
        },
        "id": "pPCccxGY35eQ",
        "outputId": "02be0266-3f7e-474a-9ba0-95fb474dc5e6"
      },
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Batches:   0%|          | 0/1 [00:00<?, ?it/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "55035bf31852417c859a735472f6f395"
            }
          },
          "metadata": {}
        }
      ],
      "source": [
        "results = search_reviews(df,query,15)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "fLxyOSxJEUvv",
        "outputId": "01115b1b-dcaf-4180-e942-5679fa7a9b27"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "       review_id        date  review_rating  \\\n",
              "10033  858737654  2022-09-06              4   \n",
              "207    834926510  2022-04-17              5   \n",
              "21898  839455495  2022-05-22              5   \n",
              "286    735951747  2019-12-31              5   \n",
              "14901  839820096  2022-05-24              5   \n",
              "18243  804234515  2021-08-16              5   \n",
              "9951   862930314  2022-10-02              5   \n",
              "21821  861034188  2022-09-20              5   \n",
              "6969   672935571  2019-05-09              4   \n",
              "26174  828246897  2022-02-16              5   \n",
              "21019  842370255  2022-06-11              5   \n",
              "10991  850876566  2022-07-30              5   \n",
              "12710  603670304  2018-08-06              5   \n",
              "28275  801368976  2021-08-02              5   \n",
              "21920  834074624  2022-04-10              5   \n",
              "\n",
              "                                                   title  \\\n",
              "10033                    Great hotel close to the Louvre   \n",
              "207                                  Best Paris Location   \n",
              "21898       Wonderful boutique hotel close to the Louvre   \n",
              "286                          Five Star hotel near Louvre   \n",
              "14901                 Best place to stay while in Paris!   \n",
              "18243             Perfect location and really nice hotel   \n",
              "9951   Quiet, cozy, inviting hotel in the perfect loc...   \n",
              "21821                                     Paris Vacation   \n",
              "6969                                  Nice little hotel    \n",
              "26174  Best hotel in Paris with the greatest price-va...   \n",
              "21019                                 Very good location   \n",
              "10991  Spacious, conveniently located, extremely fami...   \n",
              "12710                    Perfect Hotel, perfect location   \n",
              "28275     Best location, elegant, clean and great rooms.   \n",
              "21920                         Great Boutique style hotel   \n",
              "\n",
              "                                                    text  votes  \\\n",
              "10033  This was a great location with easy access to ...      1   \n",
              "207    You can’t beat the location of this hotel! Rig...      0   \n",
              "21898  A very nice hotel in a quiet plaza two blocks ...      0   \n",
              "286    Boutique hotel offering great rooms, service, ...      1   \n",
              "14901  My family and I are so happy we chose this hot...      1   \n",
              "18243  We just came back from a 4 day trip in Paris w...      2   \n",
              "9951   There's so many great things to say about this...      0   \n",
              "21821  Wonderful boutique hotel in a great location n...      0   \n",
              "6969   Very good location, walkable from Gare du Nord...      2   \n",
              "26174  We loved everything. \\nThe room was cleaned ev...      0   \n",
              "21019  This hotel has the best location ever!! Few st...      0   \n",
              "10991  The hotel location is perfect as the Metro sto...      0   \n",
              "12710  We stayed here last year and said if we were a...      0   \n",
              "28275  We spent 5 nights at the lovely Hotel Da Vinci...      1   \n",
              "21920  Great location close to the Louvre.  Lots of s...      0   \n",
              "\n",
              "                                                     url language platform  \\\n",
              "10033  /ShowUserReviews-g187147-d228694-r858737654-Ho...       en   MOBILE   \n",
              "207    /ShowUserReviews-g187147-d228728-r834926510-Re...       en   MOBILE   \n",
              "21898  /ShowUserReviews-g187147-d617625-r839455495-Gr...       en    OTHER   \n",
              "286    /ShowUserReviews-g187147-d228728-r735951747-Re...       en   MOBILE   \n",
              "14901  /ShowUserReviews-g187147-d229443-r839820096-Ma...       en    OTHER   \n",
              "18243  /ShowUserReviews-g187147-d207663-r804234515-Ho...       en    OTHER   \n",
              "9951   /ShowUserReviews-g187147-d228694-r862930314-Ho...       en   MOBILE   \n",
              "21821  /ShowUserReviews-g187147-d617625-r861034188-Gr...       en   MOBILE   \n",
              "6969   /ShowUserReviews-g187147-d278169-r672935571-Ho...       en   MOBILE   \n",
              "26174  /ShowUserReviews-g187147-d13568674-r828246897-...       en    OTHER   \n",
              "21019  /ShowUserReviews-g187147-d236507-r842370255-Ho...       en   MOBILE   \n",
              "10991  /ShowUserReviews-g187147-d197424-r850876566-No...       en    OTHER   \n",
              "12710  /ShowUserReviews-g187147-d283118-r603670304-Ho...       en    OTHER   \n",
              "28275  /ShowUserReviews-g187147-d6675948-r801368976-H...       en   MOBILE   \n",
              "21920  /ShowUserReviews-g187147-d617625-r834074624-Gr...       en    OTHER   \n",
              "\n",
              "                              author_id  ...    author_username  \\\n",
              "10033  107486993911F044C7A86C88BD8CBE6C  ...          kahnfeldt   \n",
              "207    58EB5EA5E1A2FCD598F7F7F9D988306A  ...  Camper46227911888   \n",
              "21898  F68553597AC1CF5735AA52480B978199  ...       johnhR7616AX   \n",
              "286    F483597920CDD1233993458D4A5DDAC3  ...        elicS9200RN   \n",
              "14901  3EA930A72E4134FEFC7EDA8F80FCB6B6  ...            Shrukom   \n",
              "18243  4110D3D69BD285509C0C1AA985550AA7  ...     Y2171PSsophiet   \n",
              "9951   6EF2DD2A7303E16C91A8A65144532717  ...     ashleygD5261NF   \n",
              "21821  7DCDB24655083B93C72B12F900AD4E81  ...            522robl   \n",
              "6969   B0335A0B574824CB19004A8E1DE134F9  ...        767valeriea   \n",
              "26174  532D02029F057CDF278CBC1E47049138  ...           leafrech   \n",
              "21019  10EB1BB79165EB742CCA43C5A664F6F3  ...       therezam2013   \n",
              "10991  C004F8B426DF2E8AC32EEC1D1BF290F9  ...        jojodarshan   \n",
              "12710  9F3C054650E8FDE779BA251711360ABC  ...            sccrref   \n",
              "28275  1FEA86D03026BB83FEB43E29EA2B2D0D  ...        marydresser   \n",
              "21920  1A544DD87197FCAC75FDA3D6E1AF6E07  ...             dtt808   \n",
              "\n",
              "                                                 name        id  \\\n",
              "10033                           Hotel Malte - Astotel    228694   \n",
              "207                   Renaissance Paris Vendome Hotel    228728   \n",
              "21898                     Grand Hotel du Palais Royal    617625   \n",
              "286                   Renaissance Paris Vendome Hotel    228728   \n",
              "14901  Maison Astor Paris, Curio Collection by Hilton    229443   \n",
              "18243                                     Hotel Cayre    207663   \n",
              "9951                            Hotel Malte - Astotel    228694   \n",
              "21821                     Grand Hotel du Palais Royal    617625   \n",
              "6969                            Hôtel Eugène en Ville    278169   \n",
              "26174                                     Le Belleval  13568674   \n",
              "21019                                 Hotel Le Regent    236507   \n",
              "10991                        Novotel Paris Les Halles    197424   \n",
              "12710                                  Hotel Recamier    283118   \n",
              "28275                                  Hotel Da Vinci   6675948   \n",
              "21920                     Grand Hotel du Palais Royal    617625   \n",
              "\n",
              "                                             description rating  rating_count  \\\n",
              "10033  Located in the 2nd district next to the Stock ...    5.0        2285.0   \n",
              "207    Bask in the lavish lifestyle of our boutique h...    4.5        1618.0   \n",
              "21898                                                NaN    NaN           NaN   \n",
              "286    Bask in the lavish lifestyle of our boutique h...    4.5        1618.0   \n",
              "14901  Welcome to Maison Astor Paris, a hidden gem on...    4.5         669.0   \n",
              "18243                                                NaN    NaN           NaN   \n",
              "9951   Located in the 2nd district next to the Stock ...    5.0        2285.0   \n",
              "21821                                                NaN    NaN           NaN   \n",
              "6969                                                 NaN    NaN           NaN   \n",
              "26174                                                NaN    NaN           NaN   \n",
              "21019                                                NaN    NaN           NaN   \n",
              "10991                                                NaN    NaN           NaN   \n",
              "12710                                                NaN    NaN           NaN   \n",
              "28275                                                NaN    NaN           NaN   \n",
              "21920                                                NaN    NaN           NaN   \n",
              "\n",
              "                                                features  \\\n",
              "10033  ['roomFeatures_allergy-free room', 'roomFeatur...   \n",
              "207    ['roomFeatures_bathrobes', 'roomFeatures_air c...   \n",
              "21898                                                NaN   \n",
              "286    ['roomFeatures_bathrobes', 'roomFeatures_air c...   \n",
              "14901  ['roomFeatures_blackout curtains', 'roomFeatur...   \n",
              "18243                                                NaN   \n",
              "9951   ['roomFeatures_allergy-free room', 'roomFeatur...   \n",
              "21821                                                NaN   \n",
              "6969                                                 NaN   \n",
              "26174                                                NaN   \n",
              "21019                                                NaN   \n",
              "10991                                                NaN   \n",
              "12710                                                NaN   \n",
              "28275                                                NaN   \n",
              "21920                                                NaN   \n",
              "\n",
              "                                                combined  \\\n",
              "10033  title great hotel close to the louvre content ...   \n",
              "207    title best paris location content you cant bea...   \n",
              "21898  title wonderful boutique hotel close to the lo...   \n",
              "286    title five star hotel near louvre content bout...   \n",
              "14901  title best place to stay while in paris conten...   \n",
              "18243  title perfect location and really nice hotel c...   \n",
              "9951   title quiet cozy inviting hotel in the perfect...   \n",
              "21821  title paris vacation content wonderful boutiqu...   \n",
              "6969   title nice little hotel content very good loca...   \n",
              "26174  title best hotel in paris with the greatest pr...   \n",
              "21019  title very good location content this hotel ha...   \n",
              "10991  title spacious conveniently located extremely ...   \n",
              "12710  title perfect hotel perfect location content w...   \n",
              "28275  title best location elegant clean and great ro...   \n",
              "21920  title great boutique style hotel content great...   \n",
              "\n",
              "                                               embedding    similarity  \n",
              "10033  [0.035538793, 0.013498049, -0.008496209, 0.054...  [0.79472184]  \n",
              "207    [-0.005801252, 0.0035435406, 0.006681457, 0.08...   [0.7688352]  \n",
              "21898  [0.04119004, 0.011581765, -0.0026638596, 0.061...   [0.7579078]  \n",
              "286    [0.03347977, -0.0011467149, 0.01731024, 0.0687...    [0.754537]  \n",
              "14901  [-0.012915008, 0.026861541, -0.009985829, 0.06...   [0.7540685]  \n",
              "18243  [0.0130880745, -0.0032941308, 0.0031664134, 0....  [0.74467826]  \n",
              "9951   [-0.025348535, 0.0065570353, -0.008588825, 0.0...  [0.74437386]  \n",
              "21821  [0.023766454, 0.027475057, -0.008030226, 0.058...   [0.7443484]  \n",
              "6969   [-0.0015443827, 0.014800229, -0.003991187, 0.0...   [0.7425858]  \n",
              "26174  [-0.020869244, 0.017070105, 0.0069490196, 0.07...     [0.74241]  \n",
              "21019  [-0.009757723, 0.053762496, 0.010709476, 0.088...  [0.74087584]  \n",
              "10991  [-0.028388182, -0.0016364702, -0.015175753, 0....  [0.73373556]  \n",
              "12710  [-0.015301604, 0.032689445, 0.0045415484, 0.06...  [0.73308814]  \n",
              "28275  [-0.044006966, 0.031862944, -0.011379889, 0.08...   [0.7326052]  \n",
              "21920  [0.014566412, 0.0031221872, -0.013135649, 0.05...  [0.73082715]  \n",
              "\n",
              "[15 rows x 21 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-c41fada4-b445-4746-b1e6-e00ddb6954c7\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>review_id</th>\n",
              "      <th>date</th>\n",
              "      <th>review_rating</th>\n",
              "      <th>title</th>\n",
              "      <th>text</th>\n",
              "      <th>votes</th>\n",
              "      <th>url</th>\n",
              "      <th>language</th>\n",
              "      <th>platform</th>\n",
              "      <th>author_id</th>\n",
              "      <th>...</th>\n",
              "      <th>author_username</th>\n",
              "      <th>name</th>\n",
              "      <th>id</th>\n",
              "      <th>description</th>\n",
              "      <th>rating</th>\n",
              "      <th>rating_count</th>\n",
              "      <th>features</th>\n",
              "      <th>combined</th>\n",
              "      <th>embedding</th>\n",
              "      <th>similarity</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>10033</th>\n",
              "      <td>858737654</td>\n",
              "      <td>2022-09-06</td>\n",
              "      <td>4</td>\n",
              "      <td>Great hotel close to the Louvre</td>\n",
              "      <td>This was a great location with easy access to ...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d228694-r858737654-Ho...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>107486993911F044C7A86C88BD8CBE6C</td>\n",
              "      <td>...</td>\n",
              "      <td>kahnfeldt</td>\n",
              "      <td>Hotel Malte - Astotel</td>\n",
              "      <td>228694</td>\n",
              "      <td>Located in the 2nd district next to the Stock ...</td>\n",
              "      <td>5.0</td>\n",
              "      <td>2285.0</td>\n",
              "      <td>['roomFeatures_allergy-free room', 'roomFeatur...</td>\n",
              "      <td>title great hotel close to the louvre content ...</td>\n",
              "      <td>[0.035538793, 0.013498049, -0.008496209, 0.054...</td>\n",
              "      <td>[0.79472184]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>207</th>\n",
              "      <td>834926510</td>\n",
              "      <td>2022-04-17</td>\n",
              "      <td>5</td>\n",
              "      <td>Best Paris Location</td>\n",
              "      <td>You can’t beat the location of this hotel! Rig...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d228728-r834926510-Re...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>58EB5EA5E1A2FCD598F7F7F9D988306A</td>\n",
              "      <td>...</td>\n",
              "      <td>Camper46227911888</td>\n",
              "      <td>Renaissance Paris Vendome Hotel</td>\n",
              "      <td>228728</td>\n",
              "      <td>Bask in the lavish lifestyle of our boutique h...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>1618.0</td>\n",
              "      <td>['roomFeatures_bathrobes', 'roomFeatures_air c...</td>\n",
              "      <td>title best paris location content you cant bea...</td>\n",
              "      <td>[-0.005801252, 0.0035435406, 0.006681457, 0.08...</td>\n",
              "      <td>[0.7688352]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21898</th>\n",
              "      <td>839455495</td>\n",
              "      <td>2022-05-22</td>\n",
              "      <td>5</td>\n",
              "      <td>Wonderful boutique hotel close to the Louvre</td>\n",
              "      <td>A very nice hotel in a quiet plaza two blocks ...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d617625-r839455495-Gr...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>F68553597AC1CF5735AA52480B978199</td>\n",
              "      <td>...</td>\n",
              "      <td>johnhR7616AX</td>\n",
              "      <td>Grand Hotel du Palais Royal</td>\n",
              "      <td>617625</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title wonderful boutique hotel close to the lo...</td>\n",
              "      <td>[0.04119004, 0.011581765, -0.0026638596, 0.061...</td>\n",
              "      <td>[0.7579078]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>286</th>\n",
              "      <td>735951747</td>\n",
              "      <td>2019-12-31</td>\n",
              "      <td>5</td>\n",
              "      <td>Five Star hotel near Louvre</td>\n",
              "      <td>Boutique hotel offering great rooms, service, ...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d228728-r735951747-Re...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>F483597920CDD1233993458D4A5DDAC3</td>\n",
              "      <td>...</td>\n",
              "      <td>elicS9200RN</td>\n",
              "      <td>Renaissance Paris Vendome Hotel</td>\n",
              "      <td>228728</td>\n",
              "      <td>Bask in the lavish lifestyle of our boutique h...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>1618.0</td>\n",
              "      <td>['roomFeatures_bathrobes', 'roomFeatures_air c...</td>\n",
              "      <td>title five star hotel near louvre content bout...</td>\n",
              "      <td>[0.03347977, -0.0011467149, 0.01731024, 0.0687...</td>\n",
              "      <td>[0.754537]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>14901</th>\n",
              "      <td>839820096</td>\n",
              "      <td>2022-05-24</td>\n",
              "      <td>5</td>\n",
              "      <td>Best place to stay while in Paris!</td>\n",
              "      <td>My family and I are so happy we chose this hot...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d229443-r839820096-Ma...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>3EA930A72E4134FEFC7EDA8F80FCB6B6</td>\n",
              "      <td>...</td>\n",
              "      <td>Shrukom</td>\n",
              "      <td>Maison Astor Paris, Curio Collection by Hilton</td>\n",
              "      <td>229443</td>\n",
              "      <td>Welcome to Maison Astor Paris, a hidden gem on...</td>\n",
              "      <td>4.5</td>\n",
              "      <td>669.0</td>\n",
              "      <td>['roomFeatures_blackout curtains', 'roomFeatur...</td>\n",
              "      <td>title best place to stay while in paris conten...</td>\n",
              "      <td>[-0.012915008, 0.026861541, -0.009985829, 0.06...</td>\n",
              "      <td>[0.7540685]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>18243</th>\n",
              "      <td>804234515</td>\n",
              "      <td>2021-08-16</td>\n",
              "      <td>5</td>\n",
              "      <td>Perfect location and really nice hotel</td>\n",
              "      <td>We just came back from a 4 day trip in Paris w...</td>\n",
              "      <td>2</td>\n",
              "      <td>/ShowUserReviews-g187147-d207663-r804234515-Ho...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>4110D3D69BD285509C0C1AA985550AA7</td>\n",
              "      <td>...</td>\n",
              "      <td>Y2171PSsophiet</td>\n",
              "      <td>Hotel Cayre</td>\n",
              "      <td>207663</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title perfect location and really nice hotel c...</td>\n",
              "      <td>[0.0130880745, -0.0032941308, 0.0031664134, 0....</td>\n",
              "      <td>[0.74467826]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9951</th>\n",
              "      <td>862930314</td>\n",
              "      <td>2022-10-02</td>\n",
              "      <td>5</td>\n",
              "      <td>Quiet, cozy, inviting hotel in the perfect loc...</td>\n",
              "      <td>There's so many great things to say about this...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d228694-r862930314-Ho...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>6EF2DD2A7303E16C91A8A65144532717</td>\n",
              "      <td>...</td>\n",
              "      <td>ashleygD5261NF</td>\n",
              "      <td>Hotel Malte - Astotel</td>\n",
              "      <td>228694</td>\n",
              "      <td>Located in the 2nd district next to the Stock ...</td>\n",
              "      <td>5.0</td>\n",
              "      <td>2285.0</td>\n",
              "      <td>['roomFeatures_allergy-free room', 'roomFeatur...</td>\n",
              "      <td>title quiet cozy inviting hotel in the perfect...</td>\n",
              "      <td>[-0.025348535, 0.0065570353, -0.008588825, 0.0...</td>\n",
              "      <td>[0.74437386]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21821</th>\n",
              "      <td>861034188</td>\n",
              "      <td>2022-09-20</td>\n",
              "      <td>5</td>\n",
              "      <td>Paris Vacation</td>\n",
              "      <td>Wonderful boutique hotel in a great location n...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d617625-r861034188-Gr...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>7DCDB24655083B93C72B12F900AD4E81</td>\n",
              "      <td>...</td>\n",
              "      <td>522robl</td>\n",
              "      <td>Grand Hotel du Palais Royal</td>\n",
              "      <td>617625</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title paris vacation content wonderful boutiqu...</td>\n",
              "      <td>[0.023766454, 0.027475057, -0.008030226, 0.058...</td>\n",
              "      <td>[0.7443484]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6969</th>\n",
              "      <td>672935571</td>\n",
              "      <td>2019-05-09</td>\n",
              "      <td>4</td>\n",
              "      <td>Nice little hotel</td>\n",
              "      <td>Very good location, walkable from Gare du Nord...</td>\n",
              "      <td>2</td>\n",
              "      <td>/ShowUserReviews-g187147-d278169-r672935571-Ho...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>B0335A0B574824CB19004A8E1DE134F9</td>\n",
              "      <td>...</td>\n",
              "      <td>767valeriea</td>\n",
              "      <td>Hôtel Eugène en Ville</td>\n",
              "      <td>278169</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title nice little hotel content very good loca...</td>\n",
              "      <td>[-0.0015443827, 0.014800229, -0.003991187, 0.0...</td>\n",
              "      <td>[0.7425858]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>26174</th>\n",
              "      <td>828246897</td>\n",
              "      <td>2022-02-16</td>\n",
              "      <td>5</td>\n",
              "      <td>Best hotel in Paris with the greatest price-va...</td>\n",
              "      <td>We loved everything. \\nThe room was cleaned ev...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d13568674-r828246897-...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>532D02029F057CDF278CBC1E47049138</td>\n",
              "      <td>...</td>\n",
              "      <td>leafrech</td>\n",
              "      <td>Le Belleval</td>\n",
              "      <td>13568674</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title best hotel in paris with the greatest pr...</td>\n",
              "      <td>[-0.020869244, 0.017070105, 0.0069490196, 0.07...</td>\n",
              "      <td>[0.74241]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21019</th>\n",
              "      <td>842370255</td>\n",
              "      <td>2022-06-11</td>\n",
              "      <td>5</td>\n",
              "      <td>Very good location</td>\n",
              "      <td>This hotel has the best location ever!! Few st...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d236507-r842370255-Ho...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>10EB1BB79165EB742CCA43C5A664F6F3</td>\n",
              "      <td>...</td>\n",
              "      <td>therezam2013</td>\n",
              "      <td>Hotel Le Regent</td>\n",
              "      <td>236507</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title very good location content this hotel ha...</td>\n",
              "      <td>[-0.009757723, 0.053762496, 0.010709476, 0.088...</td>\n",
              "      <td>[0.74087584]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10991</th>\n",
              "      <td>850876566</td>\n",
              "      <td>2022-07-30</td>\n",
              "      <td>5</td>\n",
              "      <td>Spacious, conveniently located, extremely fami...</td>\n",
              "      <td>The hotel location is perfect as the Metro sto...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d197424-r850876566-No...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>C004F8B426DF2E8AC32EEC1D1BF290F9</td>\n",
              "      <td>...</td>\n",
              "      <td>jojodarshan</td>\n",
              "      <td>Novotel Paris Les Halles</td>\n",
              "      <td>197424</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title spacious conveniently located extremely ...</td>\n",
              "      <td>[-0.028388182, -0.0016364702, -0.015175753, 0....</td>\n",
              "      <td>[0.73373556]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>12710</th>\n",
              "      <td>603670304</td>\n",
              "      <td>2018-08-06</td>\n",
              "      <td>5</td>\n",
              "      <td>Perfect Hotel, perfect location</td>\n",
              "      <td>We stayed here last year and said if we were a...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d283118-r603670304-Ho...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>9F3C054650E8FDE779BA251711360ABC</td>\n",
              "      <td>...</td>\n",
              "      <td>sccrref</td>\n",
              "      <td>Hotel Recamier</td>\n",
              "      <td>283118</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title perfect hotel perfect location content w...</td>\n",
              "      <td>[-0.015301604, 0.032689445, 0.0045415484, 0.06...</td>\n",
              "      <td>[0.73308814]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>28275</th>\n",
              "      <td>801368976</td>\n",
              "      <td>2021-08-02</td>\n",
              "      <td>5</td>\n",
              "      <td>Best location, elegant, clean and great rooms.</td>\n",
              "      <td>We spent 5 nights at the lovely Hotel Da Vinci...</td>\n",
              "      <td>1</td>\n",
              "      <td>/ShowUserReviews-g187147-d6675948-r801368976-H...</td>\n",
              "      <td>en</td>\n",
              "      <td>MOBILE</td>\n",
              "      <td>1FEA86D03026BB83FEB43E29EA2B2D0D</td>\n",
              "      <td>...</td>\n",
              "      <td>marydresser</td>\n",
              "      <td>Hotel Da Vinci</td>\n",
              "      <td>6675948</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title best location elegant clean and great ro...</td>\n",
              "      <td>[-0.044006966, 0.031862944, -0.011379889, 0.08...</td>\n",
              "      <td>[0.7326052]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>21920</th>\n",
              "      <td>834074624</td>\n",
              "      <td>2022-04-10</td>\n",
              "      <td>5</td>\n",
              "      <td>Great Boutique style hotel</td>\n",
              "      <td>Great location close to the Louvre.  Lots of s...</td>\n",
              "      <td>0</td>\n",
              "      <td>/ShowUserReviews-g187147-d617625-r834074624-Gr...</td>\n",
              "      <td>en</td>\n",
              "      <td>OTHER</td>\n",
              "      <td>1A544DD87197FCAC75FDA3D6E1AF6E07</td>\n",
              "      <td>...</td>\n",
              "      <td>dtt808</td>\n",
              "      <td>Grand Hotel du Palais Royal</td>\n",
              "      <td>617625</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>NaN</td>\n",
              "      <td>title great boutique style hotel content great...</td>\n",
              "      <td>[0.014566412, 0.0031221872, -0.013135649, 0.05...</td>\n",
              "      <td>[0.73082715]</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>15 rows × 21 columns</p>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-c41fada4-b445-4746-b1e6-e00ddb6954c7')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-c41fada4-b445-4746-b1e6-e00ddb6954c7 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-c41fada4-b445-4746-b1e6-e00ddb6954c7');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-554bd6b9-7c57-4326-a7a8-a4ba12dc1a7d\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-554bd6b9-7c57-4326-a7a8-a4ba12dc1a7d')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-554bd6b9-7c57-4326-a7a8-a4ba12dc1a7d button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "  <div id=\"id_08d33555-8bba-4900-91ca-0f707310e7ca\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('results')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_08d33555-8bba-4900-91ca-0f707310e7ca button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('results');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "results"
            }
          },
          "metadata": {},
          "execution_count": 34
        }
      ],
      "source": [
        "results"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "sCbn6KQFFEq8"
      },
      "source": [
        "Take all the reviews which are closest to the query, and groupby the hotel name"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "eAT2fzR1E3t-"
      },
      "outputs": [],
      "source": [
        "def search(query):\n",
        "  # Define a number of results to return, in this case, return only the first 15 results ranked by similarity.\n",
        "  n = 15\n",
        "\n",
        "  # Embed the query.\n",
        "  query_embedding = embedder.encode(query)\n",
        "\n",
        "  # Generate the similarity column, based on your query.\n",
        "  df[\"similarity\"] = df.embedding.apply(lambda x: cosine_similarity(x, query_embedding.reshape(768,-1)))\n",
        "\n",
        "  # Calculate the top 'n' most similar results by similarity.\n",
        "  results = (\n",
        "      df.sort_values(\"similarity\", ascending=False)\n",
        "      .head(n))\n",
        "\n",
        "  resultlist = []\n",
        "\n",
        "  # Display them in a very concise and ordered manner.\n",
        "  hlist = []\n",
        "  for r in results.index:\n",
        "      if results.name[r] not in hlist:\n",
        "          smalldf = results.loc[results.name == results.name[r]]\n",
        "          if smalldf.shape[1] > 3:\n",
        "            smalldf = smalldf[:3]\n",
        "\n",
        "          resultlist.append(\n",
        "          {\n",
        "            \"name\":results.name[r],\n",
        "            \"score\": smalldf.similarity[r][0],\n",
        "            \"rating\": smalldf.rating.max(),\n",
        "            \"relevant_reviews\": [ smalldf.text[s] for s in smalldf.index]\n",
        "          })\n",
        "          hlist.append(results.name[r])\n",
        "  return resultlist\n",
        "\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "_S89aiySE7QR",
        "outputId": "c33bc074-317d-4cae-c0d7-b2595a6c743a"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[{'name': 'Hotel Malte - Astotel',\n",
              "  'score': 0.79472184,\n",
              "  'rating': 5.0,\n",
              "  'relevant_reviews': ['This was a great location with easy access to several Metro stations, attractions, and restaurants.  It was great having snacks and drinks available all afternoon, especially since traveling with kids.  Good breakfast, and plenty of space for the 4 of us in the duplex room.  Having a second bathroom was very nice as well.',\n",
              "   \"There's so many great things to say about this hotel. The breakfast/snack area and lounge are so cute and inviting. I really enjoyed having breakfast each morning. There's great options and it's worth the price for both quality and convenience (15 euros). I eat a vegan and gluten free diet, so my options were more limited. The kitchen staff did help me find a few things (oatmeal, granola, cereal, gluten free bread, jams and peanut butter, soy milk, fruit, nuts). I'd like to see potatoes added to the line up.  \\n\\nWe stayed in a superior twin room. The beds are right next to each other, but at least we had our own bedding (I traveled with my mom). There's plenty of room for suitcases (we had two large and one small suitcase) and there's a small closet to hang some clothes and jackets. There was a tub with a shower in our room. The room is very clean, looks new and is cozy. We asked for a quiet room and it was very quiet. We couldn't hear other guests except if people were talking in the hallway. \\n\\nThe hotel staff are very nice and helpful. When I became sick during the trip, I knew the staff would be able to help me find an urgent care facility. I'm so grateful to them for their help. \\n\\nLocation is excellent. 10 min walk to the Louvre. The opera house (which was one of my favorite buildings) is a 10 min walk away. The area around the opera house is very nice...lots of shops and cafes. Also next to the hotel are lots of Asian restaurants which came in handy since I eat a vegan and gluten free diet. I went to a sushi restaurant twice and it was excellent. Place Venome is a beautiful square that is a few minutes walk away. 20 min walk to an excellent vegan restaurant called Le Potager de Charlotte. I highly recommend it. We went there twice. \\n\\nThis is the best hotel I've stayed at ever. I can't wait to go back.\"]},\n",
              " {'name': 'Renaissance Paris Vendome Hotel',\n",
              "  'score': 0.7688352,\n",
              "  'rating': 4.5,\n",
              "  'relevant_reviews': ['You can’t beat the location of this hotel! Right near the Louvre,Tuileries, Rue St Honare. Wonderful welcome,terrific concierge assistance. Restaurant staff very helpful and efficient, lovely breakfast.\\nExtremely comfortable room with all amenities, it is my first choice always in Paris!',\n",
              "   'Boutique hotel offering great rooms, service, and location! The central location allows for easy walks to many of the top sites of Paris. I used Marriott Rewards points and they gave me an upgrade. 😀😀😀😀😀']},\n",
              " {'name': 'Grand Hotel du Palais Royal',\n",
              "  'score': 0.7579078,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': ['A very nice hotel in a quiet plaza two blocks from the Louvre within walking distance of major attractions and great restaurant districts .  We stayed two nights on the 4th floor overlooking the courtyard.  The staff were incredibly friendly and helpful and the room clean and comfortable.',\n",
              "   'Wonderful boutique hotel in a great location near the Louvre. Staff is friendly and helpful, concierge did a fantastic job booking our meals and excursions. Our room included breakfast which offered plenty of great options from yogurt to pastries to omelets.\\nMy wife and I highly recommend.',\n",
              "   'Great location close to the Louvre.  Lots of shopping, bistros and restaurants close by.  Much to my surprise there was even a J Town area close by.  Hotel room is a bit small but clean and everything you need.  Nice soaking tub.  Only down sides was the renos to the restaurant but did not affect us as we did not eat in the hotel.  Everyone on staff was very friendly and helpful.  Would definitely return again.']},\n",
              " {'name': 'Maison Astor Paris, Curio Collection by Hilton',\n",
              "  'score': 0.7540685,\n",
              "  'rating': 4.5,\n",
              "  'relevant_reviews': [\"My family and I are so happy we chose this hotel. It was exceptional in every way! The location is unbeatable! 10-15 minutes walk to the Louvre, Champs Elysee, Arc de Triomphe....the list is endless! But mostly it's the people who work here who make the stay truly exceptional! We had detailed assistance from Concierge prior to arrival to plan certain aspects of our stay. And once we arrived, all the staff were wonderfully friendly and immensely helpful, no matter the time of day! No request was too much trouble for them. \"]},\n",
              " {'name': 'Hotel Cayre',\n",
              "  'score': 0.74467826,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': ['We just came back from a 4 day trip in Paris with my husband and 8 year old daughter. We stayed at the K+K hotel Cayre in their spacious room which was perfect for 3 persons and remarkably big for Paris. Our room gave on the courtyard and it was very quiet despite the very central location of the hotel.The personnel is very friendly (front desk and at breakfast). The breakfast buffet has all you need: pastries, jam/choco paste, yogurts (nature or with fruits), cereals and also scrambled egges/bacon etc for people who prefer a salty breakfast. \\nThe location is perfect, right by a metro station, a short walk to rue de Buci where you have many restaurants/bars, a short walk also to the Louvre. We only took the metro to go to the Sacre-Coeur or Versailles, we visited everything else (Eiffel Tower, Louvre, Notre Dame, Luxembourg gardens) on feet and it was just fine. \\nWe highly recommend this hotel for the friendliness of the staff and the location.\\nThere is a parking just 500m from the hotel so very easy to leave your car there.']},\n",
              " {'name': 'Hôtel Eugène en Ville',\n",
              "  'score': 0.7425858,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': ['Very good location, walkable from Gare du Nord and walkable to the Louvre, Tuileries, Galleries Lafayette. Staff when we arrived in early evening were very friendly, spoke excellent English, check in was quick and good elevator service to our third floor room. Room was quite tiny even by Paris standards but had a beautiful terrace that was actually larger than the room :) Sadly it rained the two nights, one day we were there as we were looking forward to eating breakfast out there. Although room was tiny, bed was extremely comfortable, firm, as we like it. Toilet is separate from shower room which we have noticed is common in a few modern Paris hotels. Very good shower, plenty of shower gel and shampoo. Basin is quite shallow but all very modern and the heated towel rail was nice as we needed to dry out some things after being soaked in the rain. Complimentary bottle of water and I think the bottle of wine might have been complimentary but as we don’t drink alcohol, I didn’t ask. Breakfast was excellent. It was complimentary to us as an upgrade, normal cost was €16-00. Several restaurants nearby. Would recommend for short stay but beware if you have a lot of luggage; there is no room in the room. Might suggest you move the clothes you would use for the stay into one case and store the others in the hotel luggage room.']},\n",
              " {'name': 'Le Belleval',\n",
              "  'score': 0.74241,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': ['We loved everything. \\nThe room was cleaned every day without asking and the breakfast had good quality. You definitely find something you like. You can also eat lunch here, no dinner. But there are plenty of restaurants nearby. \\nThe staff was super kind, always asked if everything was good and greated us every time we walked by. We also got a cute note for Valentine’s Day with chocolate on our room table. \\nThe location is perfect. There are many bus and metro stops nearby that connect you to literally anywhere. Plus you can walk to the Galerie Lafayette in 10 minutes, 20 minutes to the Louvre and 35 minutes to the Eiffel Tower. \\nAll in all we didn’t expect such a great hotel in Paris as the Internet is warning everyone to not expect a high standard. We will definitely come back here again.']},\n",
              " {'name': 'Hotel Le Regent',\n",
              "  'score': 0.74087584,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': ['This hotel has the best location ever!! Few steps from Pont Neuf you can walk to Louvre, Notre Dame, St Gemain de Pres, Saint Chapelle , lot of metro station around(closest is line 4 Odeon) , just 100mts away. Staff are amazing gentle and polite. Always there for help. Breakfast is fair, orange juice, yogurt, baguette and 2 croissants.\\nI highly recomend.']},\n",
              " {'name': 'Novotel Paris Les Halles',\n",
              "  'score': 0.73373556,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': ['The hotel location is perfect as the Metro stop is 20 paces from the front door (elevator down to the station)  - Gare Nord station is one stop away -, the Louvre, Pont Neuf, and the Marais district are a convenient 20 minute walk from the hotel.  There are a ton of cafes and restaurants with a variety of dining options (French, Italian, Indian, Lebonese, etc) just across the street.  The rooms are spacious and comfortable and the staff is very friendly, available at all times and accommodating.']},\n",
              " {'name': 'Hotel Recamier',\n",
              "  'score': 0.73308814,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': [\"We stayed here last year and said if we were able to return to Paris we would stay here again. I know there are tons of hotel choices in Paris but given the fantastic service, the perfect location and the comfort of the hotel, its hard for my wife and I even considering staying anywhere else. First the hotel. We had room 32, which overlooked Place St Sulpice. If you are going to spend the $ to stay there I'd pay a little more and get the view. Room decent size. Not huge but sufficient for 6 nights. Small sitting area, very comfortable bed, closet. Decent size bathroom/shower. Staff amazing and helpful. From helping with reservations to anything/anywhere, to giving advice to just asking about your day. I had trouble using a web site to get museum tx and one of the staff used his phone, bought the tx and I paid him back. Saved us a lot of time in line. Another time they told us about a web site you had to use in order to get tx to climb up Notre Dame. You do have to pay for breakfast but its elegant, you can sit in an outside patio, and if you are there more than 1 night odds high they will know your coffee preferences by the 2nd morning.Of the 6 days I think we ate there 4x. There are many places nearby if you want something else. Second reason to book is the location- The Luxembourg gardens are right behind you. There are many very good restaurants and bars just across the square. There is a bus stop across the square and a metro nearby. You can easily walk to Notre Dame, D'Orsay, even the Louvre (or a bus drops you off in front). And we are 60+.. We pretty much walked the entire 6th Arrond. Lots of shopping nearby and along St Germain. Despite all of this the area is pretty quiet. You also have a famous church right in front of you and maybe a even more famous one a few blocks over (not counting ND). There is even a grocery store (Marks and Spenser) around the corner. We have friends in Paris and even they were impressed when they found out where we were staying\"]},\n",
              " {'name': 'Hotel Da Vinci',\n",
              "  'score': 0.7326052,\n",
              "  'rating': nan,\n",
              "  'relevant_reviews': ['We spent 5 nights at the lovely Hotel Da Vinci, and recommend it highly. It is a small, elegant hotel. Fabulous staff were welcoming and extremely helpful. The room was in the back, so there was no view but that did not matter to us. The room was small but not confining, with a beautiful and comfortable large king sized bed, dressed in white bedding with real down pillows and comforter. We appreciated that as we hate the polyester bedding so many hotels use. The room was nicely cool with a quiet indiscrete air conditioner. We loved the bathroom, and the shower is a dream, great pressure, a huge rainshower head and a large shower stall. There were two nice closets, and good lighting.\\nThe spa in the basement is a real treat, very magical and beautiful, and great to swim or soak, with a fantastic overhead jet to massage neck or back. \\nBest of all, the location is perfect, two blocks to the Seine, the Louvre is right across the river, and a short couple of blocks to the heart of Saint Germain. Easy walking location but not in an overrun tourist location.']}]"
            ]
          },
          "metadata": {},
          "execution_count": 36
        }
      ],
      "source": [
        "search('hotel close to Louvre and great food nearby but not too expensive')"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "DFntdIWwrKqp"
      },
      "outputs": [],
      "source": [
        "from google.colab import userdata\n",
        "import openai\n",
        "openai.api_key = userdata.get('OPENAI_API_KEY')\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "7cxi9r3kraPD"
      },
      "outputs": [],
      "source": [
        "def generate_answer(query):\n",
        "    prompt = f\"\"\"\n",
        "    Based on the following query from a user, please generate a detailed answer based on the context\n",
        "    focusing on which is the top three hotel based on the query. You should respond as you are a travel agent and are conversing with the\n",
        "    user in a nice cordial way. Always address the user as Travis. Make sure you infrom the user why this is a good answer. The answer should be a paragph\n",
        "    remove the special characters and (/n ) , make the output clean and concise.\n",
        "    Answer only as a poet.\n",
        "\n",
        "\n",
        "    ###########\n",
        "    query:\n",
        "    \"{query}\"\n",
        "\n",
        "    ########\n",
        "\n",
        "    context:\"\n",
        "    \"{search(query)}\"\n",
        "    #####\n",
        "\n",
        "    Return in Markdown format with each hotel highlighted.\n",
        "    \"\"\"\n",
        "\n",
        "    messages = [\n",
        "        {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n",
        "        {\"role\": \"user\", \"content\": prompt}\n",
        "    ]\n",
        "    response = openai.ChatCompletion.create(\n",
        "        model=\"gpt-4o-mini\",\n",
        "        max_tokens=1500,\n",
        "        n=1,\n",
        "        stop=None,\n",
        "        temperature=0.2, #higher temperature means more creative or more hallucination\n",
        "        messages = messages\n",
        "\n",
        "\n",
        "    )\n",
        "\n",
        "    # Extract the generated response from the API response\n",
        "    generated_text = response.choices[0].message['content'].strip()\n",
        "\n",
        "    return generated_text\n",
        "\n",
        "# # Example usage\n",
        "# query = \"What are the best amenities offered by Hotel XYZ?\"\n",
        "# response = generate_hotel_response(query)\n",
        "# print(response)\n",
        "\n",
        "    #return response.choices[0].message.content.strip()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "QbUDJ6eysKRo"
      },
      "outputs": [],
      "source": [
        "txt=generate_answer('close to Louvre and great food nearby but not too expensive')"
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "OeluXbwPKn31"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "# prompt"
      ],
      "metadata": {
        "id": "_6yI2eRlKn2Y"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [],
      "metadata": {
        "id": "9-RVKRmxKnvV"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "yVHOOce11mdS"
      },
      "outputs": [],
      "source": [
        "import markdown\n",
        "from IPython.display import display, HTML\n",
        "\n",
        "def render_markdown(md_text):\n",
        "    # Convert Markdown to HTML\n",
        "    html = markdown.markdown(md_text)\n",
        "    # Display the HTML\n",
        "    display(HTML(html))"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 267
        },
        "id": "qLnHEDdy1rUM",
        "outputId": "293500c0-ac06-419d-f2a3-6680b6f5f98a"
      },
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ],
            "text/html": [
              "<p>Hello Travis,</p>\n",
              "<p>Based on your request for hotels close to the Louvre with great food options nearby but not too expensive, I recommend the following top three choices:</p>\n",
              "<p><strong>Renaissance Paris Vendome Hotel</strong> - This hotel boasts an unbeatable location just steps from the Louvre and Tuileries. Guests rave about the wonderful welcome and efficient concierge service, making it a top pick for comfort and convenience. The lovely breakfast and comfortable rooms add to its charm, ensuring a delightful stay without breaking the bank.</p>\n",
              "<p><strong>Hotel Malte - Astotel</strong> - With a perfect location near several Metro stations and attractions, this hotel is ideal for families and travelers alike. Guests appreciate the complimentary snacks and drinks available throughout the day, along with a good breakfast. The spacious duplex rooms provide ample space for families, making it a great value for your stay.</p>\n",
              "<p><strong>Hotel Da Vinci</strong> - This elegant hotel is just a short walk from the Louvre and offers a magical spa experience. Guests love the welcoming staff and comfortable rooms, complete with luxurious bedding. Its prime location allows for easy exploration of Paris, while still providing a peaceful retreat from the bustling tourist areas.</p>\n",
              "<p>These selections not only meet your criteria but also come highly recommended by previous guests for their exceptional service and proximity to both cultural landmarks and dining options. Enjoy your trip to Paris, Travis!</p>"
            ]
          },
          "metadata": {}
        }
      ],
      "source": [
        "render_markdown(txt)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Yj2lceIaFcjk"
      },
      "source": [
        "#Building the API"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 610
        },
        "id": "9C0KjUJK42hM",
        "outputId": "5b5d586e-76c7-4647-d804-7d40f23f9c5e"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
            "* Running on public URL: https://07955ce1b7b0132dee.gradio.live\n",
            "\n",
            "This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ],
            "text/html": [
              "<div><iframe src=\"https://07955ce1b7b0132dee.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": []
          },
          "metadata": {},
          "execution_count": 55
        }
      ],
      "source": [
        "\n",
        "import gradio as gr\n",
        "\n",
        "# def search(query):\n",
        "#   n = 15\n",
        "#   query_embedding = embedder.encode(query)\n",
        "#   df[\"similarity\"] = df.embedding.apply(lambda x: cosine_similarity(x, query_embedding.reshape(768,-1)))\n",
        "\n",
        "#   results = (\n",
        "#       df.sort_values(\"similarity\", ascending=False)\n",
        "#       .head(n))\n",
        "\n",
        "#   resultlist = []\n",
        "\n",
        "#   hlist = []\n",
        "#   for r in results.index:\n",
        "#       if results.name[r] not in hlist:\n",
        "#           smalldf = results.loc[results.name == results.name[r]]\n",
        "#           smallarr = smalldf.similarity[r].max()\n",
        "#           sm =smalldf.rating[r].mean()\n",
        "\n",
        "#           if smalldf.shape[1] > 3:\n",
        "#             smalldf = smalldf[:3]\n",
        "\n",
        "#           resultlist.append(\n",
        "#           {\n",
        "#             \"name\":results.name[r],\n",
        "#             \"description\":results.description[r],\n",
        "#             \"relevance score\": smallarr.tolist(),\n",
        "#             \"rating\": sm.tolist(),\n",
        "#             \"relevant_reviews\": [ smalldf.text[s] for s in smalldf.index]\n",
        "#           })\n",
        "#           hlist.append(results.name[r])\n",
        "#   return resultlist\n",
        "\n",
        "def greet(query):\n",
        "    bm25 = generate_answer(query)\n",
        "    return bm25\n",
        "\n",
        "# Use the gradio library to display a user interface for your user to interact with.\n",
        "demo = gr.Interface(fn=greet, inputs=\"text\", outputs=\"text\")\n",
        "\n",
        "# Launch the user demo - This can be done directly in your colab notebook. On your local notebook, you can also give a personalized localhost:port address.\n",
        "demo.launch(share=True,debug=False)\n",
        "# COPY THE URL THAT APPEARS BELOW"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "gi6n9mcSlmQl",
        "outputId": "56decf25-067e-468b-e1fe-15547affa5ce"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Requirement already satisfied: gradio in /usr/local/lib/python3.10/dist-packages (4.40.0)\n",
            "Requirement already satisfied: aiofiles<24.0,>=22.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (23.2.1)\n",
            "Requirement already satisfied: anyio<5.0,>=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
            "Requirement already satisfied: fastapi in /usr/local/lib/python3.10/dist-packages (from gradio) (0.112.0)\n",
            "Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio) (0.4.0)\n",
            "Requirement already satisfied: gradio-client==1.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.2.0)\n",
            "Requirement already satisfied: httpx>=0.24.1 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.27.0)\n",
            "Requirement already satisfied: huggingface-hub>=0.19.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.23.5)\n",
            "Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.4.0)\n",
            "Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.1.4)\n",
            "Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.5)\n",
            "Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.7.1)\n",
            "Requirement already satisfied: numpy<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (1.26.4)\n",
            "Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (3.10.6)\n",
            "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio) (24.1)\n",
            "Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.1.4)\n",
            "Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (9.4.0)\n",
            "Requirement already satisfied: pydantic>=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.8.2)\n",
            "Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio) (0.25.1)\n",
            "Requirement already satisfied: python-multipart>=0.0.9 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.0.9)\n",
            "Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (6.0.1)\n",
            "Requirement already satisfied: ruff>=0.2.2 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.5.6)\n",
            "Requirement already satisfied: semantic-version~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.10.0)\n",
            "Requirement already satisfied: tomlkit==0.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.0)\n",
            "Requirement already satisfied: typer<1.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.12.3)\n",
            "Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (4.12.2)\n",
            "Requirement already satisfied: urllib3~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (2.0.7)\n",
            "Requirement already satisfied: uvicorn>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio) (0.30.5)\n",
            "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.2.0->gradio) (2024.6.1)\n",
            "Requirement already satisfied: websockets<13.0,>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio-client==1.2.0->gradio) (12.0)\n",
            "Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (3.7)\n",
            "Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.3.1)\n",
            "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5.0,>=3.0->gradio) (1.2.2)\n",
            "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (2024.7.4)\n",
            "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio) (1.0.5)\n",
            "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.10/dist-packages (from httpcore==1.*->httpx>=0.24.1->gradio) (0.14.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (3.15.4)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (2.31.0)\n",
            "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio) (4.66.4)\n",
            "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.2.1)\n",
            "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (0.12.1)\n",
            "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (4.53.1)\n",
            "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (1.4.5)\n",
            "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (3.1.2)\n",
            "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.1)\n",
            "Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio) (2024.1)\n",
            "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (0.7.0)\n",
            "Requirement already satisfied: pydantic-core==2.20.1 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio) (2.20.1)\n",
            "Requirement already satisfied: click>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (8.1.7)\n",
            "Requirement already satisfied: shellingham>=1.3.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (1.5.4)\n",
            "Requirement already satisfied: rich>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer<1.0,>=0.12->gradio) (13.7.1)\n",
            "Requirement already satisfied: starlette<0.38.0,>=0.37.2 in /usr/local/lib/python3.10/dist-packages (from fastapi->gradio) (0.37.2)\n",
            "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\n",
            "Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (3.0.0)\n",
            "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /usr/local/lib/python3.10/dist-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.16.1)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub>=0.19.3->gradio) (3.3.2)\n",
            "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.1.2)\n"
          ]
        }
      ],
      "source": [
        "!pip install --upgrade gradio"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 382
        },
        "id": "AMlNHxBKED5t",
        "outputId": "2e938ba2-14da-4ada-dca8-b1cdc566e794"
      },
      "outputs": [
        {
          "name": "stdout",
          "output_type": "stream",
          "text": [
            "Loaded as API: https://7142ca2aabef402984.gradio.live/ ✔\n"
          ]
        },
        {
          "ename": "ValueError",
          "evalue": "Could not fetch config for https://7142ca2aabef402984.gradio.live/",
          "output_type": "error",
          "traceback": [
            "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
            "\u001b[0;31mValueError\u001b[0m                                Traceback (most recent call last)",
            "\u001b[0;32m<ipython-input-56-c413f8e5de94>\u001b[0m in \u001b[0;36m<cell line: 7>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;31m# PASTE THE URL FROM ABOVE HERE\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mclient\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mClient\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"https://7142ca2aabef402984.gradio.live/\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      8\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      9\u001b[0m \u001b[0;31m# Use the 'predict' method of the Client instance to send a request to the Gradio app.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/gradio_client/client.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, src, hf_token, max_workers, verbose, auth, httpx_kwargs, headers, download_files, ssl_verify, _skip_components)\u001b[0m\n\u001b[1;32m    150\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_login\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mauth\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    151\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 152\u001b[0;31m         \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfig\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_config\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    153\u001b[0m         self.protocol: Literal[\"ws\", \"sse\", \"sse_v1\", \"sse_v2\", \"sse_v2.1\"] = (\n\u001b[1;32m    154\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"protocol\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"ws\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;32m/usr/local/lib/python3.10/dist-packages/gradio_client/client.py\u001b[0m in \u001b[0;36m_get_config\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    871\u001b[0m             )\n\u001b[1;32m    872\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_success\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 873\u001b[0;31m                 \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mf\"Could not fetch config for {self.src}\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    874\u001b[0m             \u001b[0;31m# some basic regex to extract the config\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    875\u001b[0m             \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mre\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msearch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mr\"window.gradio_config = (.*?);[\\s]*</script>\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtext\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
            "\u001b[0;31mValueError\u001b[0m: Could not fetch config for https://7142ca2aabef402984.gradio.live/"
          ]
        }
      ],
      "source": [
        "# Import the Client class from the gradio_client module.\n",
        "from gradio_client import Client\n",
        "\n",
        "# Create an instance of the Client class. The URL provided should point to a live Gradio app.\n",
        "\n",
        "# PASTE THE URL FROM ABOVE HERE\n",
        "client = Client(\"https://7142ca2aabef402984.gradio.live/\")\n",
        "\n",
        "# Use the 'predict' method of the Client instance to send a request to the Gradio app.\n",
        "# The string \"Hotel near the Eiffel Tower!\" is passed to the 'query' textbox component of the app.\n",
        "# 'api_name' specifies the endpoint ('/predict') that the Gradio interface exposes for processing this input.\n",
        "result = client.predict(\n",
        "\t\t\t\t\"Hotel near the Eiffel Tower!\",\t# str in 'query' Textbox component\n",
        "\t\t\t\tapi_name=\"/predict\"\n",
        ")\n",
        "\n",
        "# Print the result returned from the Gradio app. This output depends on how the Gradio app processes the input.\n",
        "print(result)\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "fetQvcLVHlVX"
      },
      "outputs": [],
      "source": [
        "result"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "zA48ByhblCeG"
      },
      "source": []
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "gpuType": "T4",
      "provenance": [],
      "include_colab_link": true
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    },
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "035978731c9c43c792fcb98245b9d6b4": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_106a9909364b4a9c8d7edc94caa39989",
            "placeholder": "​",
            "style": "IPY_MODEL_21ef620d80604b4a8fbd0043d253eda3",
            "value": " 1/1 [00:00&lt;00:00, 20.73it/s]"
          }
        },
        "0600ca30b26840c284b8b7f7e9b17537": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ce50402307ce4c9381ef46ba967c633a",
            "placeholder": "​",
            "style": "IPY_MODEL_8c67887b415243a5bdc936185129d754",
            "value": "Batches: 100%"
          }
        },
        "0d00ee08c9ca4dc2913bdaf5e23a1d1b": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "106a9909364b4a9c8d7edc94caa39989": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "1977653e40a14c6b916335eac0edf3b2": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "21ef620d80604b4a8fbd0043d253eda3": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "24394d5265a747159f7876e9e935b80e": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "29722c68d46741899e9172bb9b83cb5c": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_c58441daa1f44b38bb60df207fc910c3",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_24394d5265a747159f7876e9e935b80e",
            "value": 1
          }
        },
        "2eab1853534d408996a384ddc83cb5d6": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_35d69789141e46e58f30279a5994471a",
            "placeholder": "​",
            "style": "IPY_MODEL_7b0394e29ec740e496d38bca3e304b12",
            "value": "Batches: 100%"
          }
        },
        "2f8c8d5f25e24a32b53ac0cdd85c7e30": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_2eab1853534d408996a384ddc83cb5d6",
              "IPY_MODEL_51a4f03b642e4950b10fa4cec6c1bc44",
              "IPY_MODEL_3d367015f20c4d449062656e297348d8"
            ],
            "layout": "IPY_MODEL_648fe24f29a64423b373cc663c267388"
          }
        },
        "35d69789141e46e58f30279a5994471a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3d367015f20c4d449062656e297348d8": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HTMLModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_1977653e40a14c6b916335eac0edf3b2",
            "placeholder": "​",
            "style": "IPY_MODEL_8267a2370fcf40b0830a171e5eb5c3ab",
            "value": " 1/1 [00:00&lt;00:00,  3.11it/s]"
          }
        },
        "51a4f03b642e4950b10fa4cec6c1bc44": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "FloatProgressModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9711144e69f548b087451cbc717aabc5",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_6cf036ff8eb043b2b3dd2e4edd51167d",
            "value": 1
          }
        },
        "648fe24f29a64423b373cc663c267388": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6cf036ff8eb043b2b3dd2e4edd51167d": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "ProgressStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7a02bbcceda94bc0a55e5d8e61c4b196": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "HBoxModel",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_0600ca30b26840c284b8b7f7e9b17537",
              "IPY_MODEL_29722c68d46741899e9172bb9b83cb5c",
              "IPY_MODEL_035978731c9c43c792fcb98245b9d6b4"
            ],
            "layout": "IPY_MODEL_0d00ee08c9ca4dc2913bdaf5e23a1d1b"
          }
        },
        "7b0394e29ec740e496d38bca3e304b12": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "8267a2370fcf40b0830a171e5eb5c3ab": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "8c67887b415243a5bdc936185129d754": {
          "model_module": "@jupyter-widgets/controls",
          "model_module_version": "1.5.0",
          "model_name": "DescriptionStyleModel",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "9711144e69f548b087451cbc717aabc5": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "c58441daa1f44b38bb60df207fc910c3": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ce50402307ce4c9381ef46ba967c633a": {
          "model_module": "@jupyter-widgets/base",
          "model_module_version": "1.2.0",
          "model_name": "LayoutModel",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "4a00514c81fd449fbfab23d6494cd0c3": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_3d476ddbe94d4006b3efb17f7515ab6d",
              "IPY_MODEL_dbef8ef709fc4f638fc1c41677eb829e",
              "IPY_MODEL_23fc3261341e46bb8e23177a2a2f4431"
            ],
            "layout": "IPY_MODEL_d19a03c5c6274687a38ec0f167bd8d01"
          }
        },
        "3d476ddbe94d4006b3efb17f7515ab6d": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_8ecdb68e693b431aa18a15c61dd1990b",
            "placeholder": "​",
            "style": "IPY_MODEL_11a5eb96df2a4432b79569a7b8db7f74",
            "value": "modules.json: 100%"
          }
        },
        "dbef8ef709fc4f638fc1c41677eb829e": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d833ca4cd394452c9a0c3353c7e91e6a",
            "max": 349,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_835dbc885f94478fa28e5ddba26bd858",
            "value": 349
          }
        },
        "23fc3261341e46bb8e23177a2a2f4431": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_22e21dd27f314c4cbddc3f0719310462",
            "placeholder": "​",
            "style": "IPY_MODEL_2cc6e1fd273b485d9176ebfd41ad3779",
            "value": " 349/349 [00:00&lt;00:00, 22.6kB/s]"
          }
        },
        "d19a03c5c6274687a38ec0f167bd8d01": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8ecdb68e693b431aa18a15c61dd1990b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "11a5eb96df2a4432b79569a7b8db7f74": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "d833ca4cd394452c9a0c3353c7e91e6a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "835dbc885f94478fa28e5ddba26bd858": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "22e21dd27f314c4cbddc3f0719310462": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2cc6e1fd273b485d9176ebfd41ad3779": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "852c80cbf54d47bdb60584f44901654b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_1792dc504b2743c6930c620f246d937d",
              "IPY_MODEL_818706a8ceb34c138f47bf2587e8701f",
              "IPY_MODEL_598179e13efe41158ca343a6bf61e2e0"
            ],
            "layout": "IPY_MODEL_8170b6fff6284f9ea35d26b31fe3251f"
          }
        },
        "1792dc504b2743c6930c620f246d937d": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_09af1de5ae37457292074df6c42484f4",
            "placeholder": "​",
            "style": "IPY_MODEL_d772400a4b124fabb8e24640afa30a7a",
            "value": "config_sentence_transformers.json: 100%"
          }
        },
        "818706a8ceb34c138f47bf2587e8701f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_33ee2035894646a5a5c76cb84034d487",
            "max": 116,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_b4a18fb9d789477ea2e368d711b9f532",
            "value": 116
          }
        },
        "598179e13efe41158ca343a6bf61e2e0": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_67e1bde26615486d9ee1a0e42ed60b91",
            "placeholder": "​",
            "style": "IPY_MODEL_65792a1a82724e4cb5637f021673f01c",
            "value": " 116/116 [00:00&lt;00:00, 4.45kB/s]"
          }
        },
        "8170b6fff6284f9ea35d26b31fe3251f": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "09af1de5ae37457292074df6c42484f4": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d772400a4b124fabb8e24640afa30a7a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "33ee2035894646a5a5c76cb84034d487": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b4a18fb9d789477ea2e368d711b9f532": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "67e1bde26615486d9ee1a0e42ed60b91": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "65792a1a82724e4cb5637f021673f01c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "9109820267744f509c5d3a3b147a2640": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_3c13c0aad7c8431ea18152a577feb854",
              "IPY_MODEL_8c80a7e209534035b857adcb6944bb97",
              "IPY_MODEL_0f92d7441d9e4d4c8432483a68f9b56b"
            ],
            "layout": "IPY_MODEL_d700563e0695412cbf9b01b7fcb0dd3e"
          }
        },
        "3c13c0aad7c8431ea18152a577feb854": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_68af25742fb549839a28c9e73a37996f",
            "placeholder": "​",
            "style": "IPY_MODEL_a43556f0695a4e1bbd4615b3631b799a",
            "value": "README.md: 100%"
          }
        },
        "8c80a7e209534035b857adcb6944bb97": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d2b2ee76413b419e9006099781bcf93e",
            "max": 10621,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_b2efbd5de21a445fa25ef75d029e4cfd",
            "value": 10621
          }
        },
        "0f92d7441d9e4d4c8432483a68f9b56b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_7a98450d3d28442ea511e65444c737fb",
            "placeholder": "​",
            "style": "IPY_MODEL_26908beb24b94cdb9644d704f214082d",
            "value": " 10.6k/10.6k [00:00&lt;00:00, 420kB/s]"
          }
        },
        "d700563e0695412cbf9b01b7fcb0dd3e": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "68af25742fb549839a28c9e73a37996f": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a43556f0695a4e1bbd4615b3631b799a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "d2b2ee76413b419e9006099781bcf93e": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b2efbd5de21a445fa25ef75d029e4cfd": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "7a98450d3d28442ea511e65444c737fb": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "26908beb24b94cdb9644d704f214082d": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "ab6c68869e294af3a8f92ed918c346f7": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_94ae758926654fc1be08df01c66ed856",
              "IPY_MODEL_997d0ce587b244cb82dd76a86256ea30",
              "IPY_MODEL_c4159b8cadf64b82a0737c84b8cba769"
            ],
            "layout": "IPY_MODEL_c70d1ee9b9874ad58ed60db2e6013d74"
          }
        },
        "94ae758926654fc1be08df01c66ed856": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9490add0a3af4cfabff51c2dc2c17c47",
            "placeholder": "​",
            "style": "IPY_MODEL_2d0917a70a764781a360873463566d9c",
            "value": "sentence_bert_config.json: 100%"
          }
        },
        "997d0ce587b244cb82dd76a86256ea30": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_05dbad55ad2446a3b75a6ecaaed61ec0",
            "max": 53,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_bb1ee57d090148b187bd12f5318c465c",
            "value": 53
          }
        },
        "c4159b8cadf64b82a0737c84b8cba769": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_8b750423af1a441fab93b8f8887720c2",
            "placeholder": "​",
            "style": "IPY_MODEL_6cdbd3265969439f9930009c3f9168ea",
            "value": " 53.0/53.0 [00:00&lt;00:00, 2.92kB/s]"
          }
        },
        "c70d1ee9b9874ad58ed60db2e6013d74": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9490add0a3af4cfabff51c2dc2c17c47": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2d0917a70a764781a360873463566d9c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "05dbad55ad2446a3b75a6ecaaed61ec0": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "bb1ee57d090148b187bd12f5318c465c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "8b750423af1a441fab93b8f8887720c2": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6cdbd3265969439f9930009c3f9168ea": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "ef95867de3aa41aa85e7c4a6c1ac731c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_0204491e51a94445821c29287d5dd152",
              "IPY_MODEL_00cb6bdbc1ea484ca4839fbeb4ecb397",
              "IPY_MODEL_d510ea73105e4dad91e92dc9ceab509c"
            ],
            "layout": "IPY_MODEL_bbd541462c754ba4be3f46c478e44058"
          }
        },
        "0204491e51a94445821c29287d5dd152": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_102c721483484aa29c2bed57982a0bd5",
            "placeholder": "​",
            "style": "IPY_MODEL_55f9c987fdd645eaa1ae2b9dc7a081bf",
            "value": "config.json: 100%"
          }
        },
        "00cb6bdbc1ea484ca4839fbeb4ecb397": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_de57fd86d8d34cbdb87253d512c0c45e",
            "max": 571,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_591694d7617c4233a750d1674d2086e6",
            "value": 571
          }
        },
        "d510ea73105e4dad91e92dc9ceab509c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_5661e15e67834634bb8631b0e68a4a21",
            "placeholder": "​",
            "style": "IPY_MODEL_6538fde2201b4a97b1cf023104e5c856",
            "value": " 571/571 [00:00&lt;00:00, 23.8kB/s]"
          }
        },
        "bbd541462c754ba4be3f46c478e44058": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "102c721483484aa29c2bed57982a0bd5": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "55f9c987fdd645eaa1ae2b9dc7a081bf": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "de57fd86d8d34cbdb87253d512c0c45e": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "591694d7617c4233a750d1674d2086e6": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "5661e15e67834634bb8631b0e68a4a21": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6538fde2201b4a97b1cf023104e5c856": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2212cebf1de74632bcb591ada4d8d053": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_a9f4e5752a9c4dafa2a8f208ff14be41",
              "IPY_MODEL_43063dec6fab43b99510ed07f32d70ac",
              "IPY_MODEL_0bd1368448f04c7f912951504754e65a"
            ],
            "layout": "IPY_MODEL_8e95d6d8be2f4858a94e383d921f2475"
          }
        },
        "a9f4e5752a9c4dafa2a8f208ff14be41": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_4b4324e0bb8d4394b209dfbab7c211eb",
            "placeholder": "​",
            "style": "IPY_MODEL_0f5dbf4913ad401598874d176d3d60d0",
            "value": "model.safetensors: 100%"
          }
        },
        "43063dec6fab43b99510ed07f32d70ac": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ad88421e165c4d5da2d0115d3153e66d",
            "max": 437971872,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_0f48e4d1a8f24533a36c67cc2f703fb0",
            "value": 437971872
          }
        },
        "0bd1368448f04c7f912951504754e65a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_09c18520b8e94788b701b06f137ad9c9",
            "placeholder": "​",
            "style": "IPY_MODEL_7959efcae810424cbea454609a951029",
            "value": " 438M/438M [00:06&lt;00:00, 62.4MB/s]"
          }
        },
        "8e95d6d8be2f4858a94e383d921f2475": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "4b4324e0bb8d4394b209dfbab7c211eb": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0f5dbf4913ad401598874d176d3d60d0": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "ad88421e165c4d5da2d0115d3153e66d": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0f48e4d1a8f24533a36c67cc2f703fb0": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "09c18520b8e94788b701b06f137ad9c9": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "7959efcae810424cbea454609a951029": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "ceb29f720964496f8055f2c81c3eead5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_0f0e7a31ad6b4588aa925f420277183e",
              "IPY_MODEL_f3abdd95082046a6bc6b391520d41320",
              "IPY_MODEL_ee99a0a84b0841fdaf5f824303832640"
            ],
            "layout": "IPY_MODEL_17a234d512364b58a3eecb7c69bcbfa1"
          }
        },
        "0f0e7a31ad6b4588aa925f420277183e": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ed16f602e42a4c2d93970f580bb1479b",
            "placeholder": "​",
            "style": "IPY_MODEL_5dbdaf59e5064f57bba4f608762b1fe1",
            "value": "tokenizer_config.json: 100%"
          }
        },
        "f3abdd95082046a6bc6b391520d41320": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_627e60876cc648428934df4927ab6cd9",
            "max": 363,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_ce98be17dff84e058af1056b8f71ebb4",
            "value": 363
          }
        },
        "ee99a0a84b0841fdaf5f824303832640": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_99c7806835df4dccaa15c62305160e91",
            "placeholder": "​",
            "style": "IPY_MODEL_afbaf3e5e8f641a097597b7ceb236c66",
            "value": " 363/363 [00:00&lt;00:00, 17.7kB/s]"
          }
        },
        "17a234d512364b58a3eecb7c69bcbfa1": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ed16f602e42a4c2d93970f580bb1479b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5dbdaf59e5064f57bba4f608762b1fe1": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "627e60876cc648428934df4927ab6cd9": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ce98be17dff84e058af1056b8f71ebb4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "99c7806835df4dccaa15c62305160e91": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "afbaf3e5e8f641a097597b7ceb236c66": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "b730221503674245967630571d8dd4ac": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_f41b871bf9b2441587151c829fe1535f",
              "IPY_MODEL_223d1dc305fe4e709002f3e5be752acb",
              "IPY_MODEL_c21a1bac47ef4b31bc3c8f3331d2700f"
            ],
            "layout": "IPY_MODEL_7d124f0ade55495ea9292179130be92b"
          }
        },
        "f41b871bf9b2441587151c829fe1535f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_8f69949b4bfd4a9ba54ae93c2bafb5e3",
            "placeholder": "​",
            "style": "IPY_MODEL_396d90e4f45f40828a54e72f02e656e7",
            "value": "vocab.txt: 100%"
          }
        },
        "223d1dc305fe4e709002f3e5be752acb": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2cec2602e01a4e3bb9f86e672d2df936",
            "max": 231536,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_834a4b133e5d4a818b3d2b595aa8c5be",
            "value": 231536
          }
        },
        "c21a1bac47ef4b31bc3c8f3331d2700f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_e6cd0094a13b41078d3cf5c0870cb646",
            "placeholder": "​",
            "style": "IPY_MODEL_0511498a18634cb1b0b222bf5c2d124b",
            "value": " 232k/232k [00:00&lt;00:00, 9.14MB/s]"
          }
        },
        "7d124f0ade55495ea9292179130be92b": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8f69949b4bfd4a9ba54ae93c2bafb5e3": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "396d90e4f45f40828a54e72f02e656e7": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2cec2602e01a4e3bb9f86e672d2df936": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "834a4b133e5d4a818b3d2b595aa8c5be": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "e6cd0094a13b41078d3cf5c0870cb646": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0511498a18634cb1b0b222bf5c2d124b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "3eefc31bfda24991b746636c544bd4a9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_0cae7bbe65d54414aefe452deb4832cb",
              "IPY_MODEL_85707acbf5a944eba5fe22930305dd90",
              "IPY_MODEL_c75965de469d498ab92c02a62dc9f78f"
            ],
            "layout": "IPY_MODEL_a07b31a740dd4ef98c3e750de8d2b3bd"
          }
        },
        "0cae7bbe65d54414aefe452deb4832cb": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ae224be0001f4d9b99877c31cbbf6643",
            "placeholder": "​",
            "style": "IPY_MODEL_36d3d8e5901f4397bb2e4d9d11e0f5c8",
            "value": "tokenizer.json: 100%"
          }
        },
        "85707acbf5a944eba5fe22930305dd90": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9f412d9733ca4442ad02bfb016013ec6",
            "max": 466021,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_06ce5e709a6843b0971a90f05aef5f4a",
            "value": 466021
          }
        },
        "c75965de469d498ab92c02a62dc9f78f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_ea3f3c8975a84fa99b90bfe66c185422",
            "placeholder": "​",
            "style": "IPY_MODEL_26e21b33b41642a2bdbd43926715a882",
            "value": " 466k/466k [00:00&lt;00:00, 23.9MB/s]"
          }
        },
        "a07b31a740dd4ef98c3e750de8d2b3bd": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ae224be0001f4d9b99877c31cbbf6643": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "36d3d8e5901f4397bb2e4d9d11e0f5c8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "9f412d9733ca4442ad02bfb016013ec6": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "06ce5e709a6843b0971a90f05aef5f4a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "ea3f3c8975a84fa99b90bfe66c185422": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "26e21b33b41642a2bdbd43926715a882": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "1487cb2ebcd7422e84be447b78613770": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_eddbcc5363a94058b7dc662b15c14be4",
              "IPY_MODEL_b99277838bff441a90c1291c10555ef9",
              "IPY_MODEL_cfb00a79a484480d8005f9c1ecf42633"
            ],
            "layout": "IPY_MODEL_b61ecd00cbca41008f98b547916453ac"
          }
        },
        "eddbcc5363a94058b7dc662b15c14be4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_381656c53ad846f3bd71e53b70646ded",
            "placeholder": "​",
            "style": "IPY_MODEL_b16885f4db0f495e92a2cb7a8bc3f233",
            "value": "special_tokens_map.json: 100%"
          }
        },
        "b99277838bff441a90c1291c10555ef9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_67259c151da548f78ba50579f68193ec",
            "max": 239,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_8a9a98b061934fb1a62b9322b56a72bd",
            "value": 239
          }
        },
        "cfb00a79a484480d8005f9c1ecf42633": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_308443e3107a40bdb21bcda2feb65174",
            "placeholder": "​",
            "style": "IPY_MODEL_b706d0ef94834e3d8ba9d85462443af3",
            "value": " 239/239 [00:00&lt;00:00, 17.0kB/s]"
          }
        },
        "b61ecd00cbca41008f98b547916453ac": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "381656c53ad846f3bd71e53b70646ded": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b16885f4db0f495e92a2cb7a8bc3f233": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "67259c151da548f78ba50579f68193ec": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8a9a98b061934fb1a62b9322b56a72bd": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "308443e3107a40bdb21bcda2feb65174": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b706d0ef94834e3d8ba9d85462443af3": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "5e8cf12f77f74a9ea5c45276adb72997": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_7205effdd95940228e17808570d33f0c",
              "IPY_MODEL_13021f948cda4866aca08a0e651f1d72",
              "IPY_MODEL_726912791dc240e898dce9412e2093a2"
            ],
            "layout": "IPY_MODEL_9805c18c93244f24bf140394fb130c3a"
          }
        },
        "7205effdd95940228e17808570d33f0c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_6de2a88fd5424a55bdc5a47b0e4757a0",
            "placeholder": "​",
            "style": "IPY_MODEL_8ed73b34d54e4c6da45b147a0cd9848f",
            "value": "1_Pooling/config.json: 100%"
          }
        },
        "13021f948cda4866aca08a0e651f1d72": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d51633422c7548b290f00d7097db549c",
            "max": 190,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_980855fb7d174f13afe0727e972081f5",
            "value": 190
          }
        },
        "726912791dc240e898dce9412e2093a2": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_219aa78b67db4a63b99e7b57ca289c49",
            "placeholder": "​",
            "style": "IPY_MODEL_8202dbd5c89447eaad8b54e837ba39e8",
            "value": " 190/190 [00:00&lt;00:00, 12.0kB/s]"
          }
        },
        "9805c18c93244f24bf140394fb130c3a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "6de2a88fd5424a55bdc5a47b0e4757a0": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8ed73b34d54e4c6da45b147a0cd9848f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "d51633422c7548b290f00d7097db549c": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "980855fb7d174f13afe0727e972081f5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "219aa78b67db4a63b99e7b57ca289c49": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8202dbd5c89447eaad8b54e837ba39e8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "55035bf31852417c859a735472f6f395": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_f56c696983084767ad93444df3d129b6",
              "IPY_MODEL_a1f1f4156018465db76b59a07378b897",
              "IPY_MODEL_c1758a8cd20043efa040a415c1a64c9b"
            ],
            "layout": "IPY_MODEL_f40edd730dfd40b3800fa4cd1b0a231d"
          }
        },
        "f56c696983084767ad93444df3d129b6": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_b727e58524bb4f7082d669d544e38bff",
            "placeholder": "​",
            "style": "IPY_MODEL_1d6fde2af3744140b4a092fc4f548a10",
            "value": "Batches: 100%"
          }
        },
        "a1f1f4156018465db76b59a07378b897": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2c3547fc527a4983b2e9714bbed98519",
            "max": 1,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_21529d7f705e46d48137268fc2425a38",
            "value": 1
          }
        },
        "c1758a8cd20043efa040a415c1a64c9b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_a5cd4c5aaee546cbaddaa6f3db89f70c",
            "placeholder": "​",
            "style": "IPY_MODEL_bf0d90fe23534f21a1cc0e635bd1d2b2",
            "value": " 1/1 [00:00&lt;00:00, 29.50it/s]"
          }
        },
        "f40edd730dfd40b3800fa4cd1b0a231d": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b727e58524bb4f7082d669d544e38bff": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "1d6fde2af3744140b4a092fc4f548a10": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "2c3547fc527a4983b2e9714bbed98519": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "21529d7f705e46d48137268fc2425a38": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "a5cd4c5aaee546cbaddaa6f3db89f70c": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "bf0d90fe23534f21a1cc0e635bd1d2b2": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        }
      }
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}